llvm-project/clang/lib/Frontend
Chad Rosier d6f716ab2a [driver] Parse diagnostic args in the driver.
Previously, only diagnostics thrown by the cc1 process were
actually honoring the diagnostic options given on the command line,
like -Werror.

Reuse the existing code in Frontend currently used for cc1,
adjusting it to not interpret -Wl, linker flags as warnings.

Also fix a faulty test exposed by this change.
It wasn't actually testing anything, and was giving this warning:

clang-3: warning: argument unused during compilation: '-verify'

Which -Werror didn't turn into an error because it was output
by the driver, not the cc1 process, and diagnostic options
weren't parsed by the driver. And you couldn't see the warning
when running the test suite.

Fixes PR12181.
Patch by Dylan Noblesmith <nobled@dreamwidth.org>.

llvm-svn: 152660
2012-03-13 20:09:56 +00:00
..
ASTConsumers.cpp Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continue 2011-11-18 00:26:59 +00:00
ASTMerge.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
ASTUnit.cpp [libclang] When there's a file error when saving the PCH, make sure to 2012-03-13 02:17:06 +00:00
CMakeLists.txt CMake: Fix build to add clangEdit to USED_LIBS. 2012-03-06 22:32:32 +00:00
CacheTokens.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
ChainedDiagnosticConsumer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
ChainedIncludesSource.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
CompilerInstance.cpp [PCH] Mark a PCH file with a flag to indicate if the serialized AST had 2012-03-07 01:51:17 +00:00
CompilerInvocation.cpp [driver] Parse diagnostic args in the driver. 2012-03-13 20:09:56 +00:00
CreateInvocationFromCommandLine.cpp Basic: import IntrusiveRefCntPtr<> into clang namespace 2012-02-20 14:00:23 +00:00
DependencyFile.cpp Delete the depfile if we could not open a header file. We cannot 2011-11-21 00:01:14 +00:00
DependencyGraph.cpp Rename -dependency-graphviz to -dependencncy-dot 2012-02-02 23:45:13 +00:00
DiagnosticRenderer.cpp Add new code migrator support for migrating existing Objective-C code to use 2012-03-06 20:06:33 +00:00
FrontendAction.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
FrontendActions.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
FrontendOptions.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
HeaderIncludeGen.cpp Basic: import SmallString<> into clang namespace 2012-02-05 02:13:05 +00:00
InitHeaderSearch.cpp Add the Solaris support directory to the header search when using libc++. 2012-03-02 10:49:52 +00:00
InitPreprocessor.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
LangStandards.cpp Remove unnecessary default cases in switches over enums. 2012-01-17 02:30:50 +00:00
LayoutOverrideSource.cpp Move instantiateTemplateAttribute into the sema namespace, make helpers static. 2012-02-06 11:13:08 +00:00
LogDiagnosticPrinter.cpp Basic: import SmallString<> into clang namespace 2012-02-05 02:13:05 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
MultiplexConsumer.cpp Replace MarkVarRequired with a more generic 2012-03-08 15:51:03 +00:00
PrintPreprocessedOutput.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
SerializedDiagnosticPrinter.cpp Serialization: Switch over to using the native SmallVector based BitstreamWriter 2012-02-29 20:31:23 +00:00
TextDiagnostic.cpp Refactor DiagnosticRenderer and SDiagsRenderer to have some functionality 2012-02-14 02:46:00 +00:00
TextDiagnosticBuffer.cpp Basic: import SmallString<> into clang namespace 2012-02-05 02:13:05 +00:00
TextDiagnosticPrinter.cpp Remove the unuseful -fdiagnostics-show-name 2012-02-15 19:45:34 +00:00
VerifyDiagnosticConsumer.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
Warnings.cpp Basic: import IntrusiveRefCntPtr<> into clang namespace 2012-02-20 14:00:23 +00:00