summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/DiagnosticOptions.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the unuseful -fdiagnostics-show-nameDavid Blaikie2012-02-151-2/+0
| | | | | | | | | | | | | | This option was added in r129614 and doesn't have any use case that I'm aware of. It's possible that external tools are using these names - and if that's the case we can certainly reassess the functionality, but for now it lets us shave out a few unneeded bits from clang. Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool. This removes the actual diagnostic name strings from clang entirely. Reviewed by Chris Lattner & Ted Kremenek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150612 91177308-0d34-0410-b5e6-96231b3b80d8
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-161-1/+4
| | | | | | | | | | | fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146749 91177308-0d34-0410-b5e6-96231b3b80d8
* Start work on SerializedDiagnosticPrinter, a new DiagnosticConsumer that ↵Ted Kremenek2011-10-291-0/+3
| | | | | | | | | | | | | | | serializes out the diagnostics for a given translation unit to a bit code file. This is a WIP. The motivation for this new DiagnosticConsumer is to provide a way for tools invoking the compiler to get its diagnostics via a libclang interface, rather than textually parsing the compiler output. This gives us flexibility to change the compiler's textual output, but have a structured data format for clients to use to get the diagnostics via a stable API. I have no tests for this, but llvm-bcanalyzer so far shows that the emitted file is well-formed. More work to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143259 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the remaining comments in Frontend to 'expansion'.Chandler Carruth2011-07-141-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135150 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce the -fdiagnostics-format=xxx option to control how ClangDouglas Gregor2011-05-211-0/+5
| | | | | | | | | | | | | | prints the file, line, and column of a diagnostic. We currently support Clang's normal format, MSVC, and Vi formats. Note that we no longer change the diagnostic format based on -fms-extensions. Patch by Andrew Fish! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131794 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-151-1/+3
| | | | | | Monrocq git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129614 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Sketch support for -diagnostic-log-file, which still doesn't do ↵Daniel Dunbar2011-04-071-0/+3
| | | | | | anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129086 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to suppress include stack printing on note diagnostics.Chandler Carruth2011-03-271-0/+1
| | | | | | | | | | | | | | | | | | These stacks are often less important than those on primary diagnostics. As the number of notes grows, this becomes increasingly important. The include stack printing is clever and doesn't print stacks for adjacent diagnostics from the same file, but when a note is in between a sequence of errors in a header file, and the notes all refer to some other file, we end up getting a worst-case ping-pong of include stacks that take up a great deal of vertical space. Still, for now, the default behavior isn't changed. We can evaluate user feedback with the flag. Patch by Richard Trieu, a couple of style tweaks from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128371 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate -fdiagnostics-binary and all of the infrastructure forDouglas Gregor2010-10-111-4/+0
| | | | | | | | | emitting diagnostics in a binary form to be consumed by libclang, since libclang no longer does any of its work out-of-process, making this code dead. Besides, this stuff never worked at 100% anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116250 91177308-0d34-0410-b5e6-96231b3b80d8
* Add machine-parseable Fix-It output as part of diagnostics, under theDouglas Gregor2010-08-191-0/+2
| | | | | | | flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111557 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option -fshow-overloads=best|all to limit the number of overloadJeffrey Yasskin2010-06-111-0/+5
| | | | | | | | candidates printed. We default to 'all'. At the moment, 'best' prints only the first 4 overloads, but we'll improve that over time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105815 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a dependency on Frontend headers in the Driver library. Also savesChandler Carruth2010-05-061-2/+2
| | | | | | | | building and passing arguments to cc1 layer when setting values to their defaults. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103162 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new -fdiagnostics-show-category=none/id/name option, giving controlChris Lattner2010-05-041-0/+3
| | | | | | | | | | | | | over choice of: t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat] t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1] t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,Format String] dox to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103056 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a limit on the depth of the macro instantiation backtraceDouglas Gregor2010-05-041-1/+6
| | | | | | | | | | | | | | | | printed in a diagnostic, similar to the limit we already have on the depth of the template instantiation backtrace. The macro instantiation backtrace is limited to 10 "instantiated from:" diagnostics; when it's longer than that, we'll show the first half, then say how many were suppressed, then show the second half. The limit can be changed with -fmacro-instantiation-limit=N, and turned off with N=0. This eliminates a lot of note spew with libraries making use of the Boost.Preprocess library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103014 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a limit on the depth of the template instantiation backtraceDouglas Gregor2010-04-201-1/+3
| | | | | | | | | | | | | | | | | we will print with each error that occurs during template instantiation. When the backtrace is longer than that, we will print N/2 of the innermost backtrace entries and N/2 of the outermost backtrace entries, then skip the middle entries with a note such as: note: suppressed 2 template instantiation contexts; use -ftemplate-backtrace-limit=N to change the number of template instantiation entries shown This should eliminate some excessively long backtraces that aren't providing any value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101882 91177308-0d34-0410-b5e6-96231b3b80d8
* add clang -cc1 level support for "-ferror-limit 42"Chris Lattner2010-04-071-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100687 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce serialization and deserialization of diagnostic informationDouglas Gregor2010-01-281-1/+5
| | | | | | | | | | | | | | | | | | | so that CIndex can report diagnostics through the normal mechanisms even when executing Clang in a separate process. This applies both when performing code completion and when using ASTs as an intermediary for clang_createTranslationUnitFromSourceFile(). The serialized format is not perfect at the moment, because it does not encapsulate macro-instantiation information. Instead, it maps all source locations back to the instantiation location. However, it does maintain source-range and fix-it information. To get perfect fidelity from the serialized format would require serializing a large chunk of the source manager; at present, it isn't clear if this code will live long enough for that to matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94740 91177308-0d34-0410-b5e6-96231b3b80d8
* diagnose invalid values of -ftabstop, patch by Christian Adaker!Chris Lattner2010-01-131-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93288 91177308-0d34-0410-b5e6-96231b3b80d8
* implement -ftabstop=width, patch by Christian AdåkerChris Lattner2010-01-091-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93078 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FrontendOptions, and starting moving clang-cc to it.Daniel Dunbar2009-11-121-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87044 91177308-0d34-0410-b5e6-96231b3b80d8
* Move warning options into DiagnosticOptions.Daniel Dunbar2009-11-121-5/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86968 91177308-0d34-0410-b5e6-96231b3b80d8
* Move dump-build-information option into DiagnosticOptions.Daniel Dunbar2009-11-121-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86966 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix commento.Daniel Dunbar2009-11-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86016 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out a diagnostic options class.Daniel Dunbar2009-11-041-0/+49
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86010 91177308-0d34-0410-b5e6-96231b3b80d8