llvm-project/clang/lib/Lex
Eli Friedman 14d3c79b45 Suppress elided variadic macro argument extension diagnostic for macros using
the related comma pasting extension.

In certain cases, we used to get two diagnostics for what is essentially one
extension.  This change suppresses the first diagnostic in certain cases
where we know we're going to print the second diagnostic.  The
diagnostic is redundant, and it can't be suppressed in the definition
of the macro because it points at the use of the macro, so we want to
avoid printing it if possible.

The implementation works by detecting constructs which look like comma
pasting at the time of the definition of the macro; this information
is then used when the macro is used.  (We can't actually detect
whether we're using the comma pasting extension until the macro is
actually used, but we can detecting constructs which will be comma
pasting if the varargs argument is elided.)

<rdar://problem/12292192>

llvm-svn: 167907
2012-11-14 02:18:46 +00:00
..
CMakeLists.txt clang/lib: [CMake] Update tblgen'd dependencies. 2012-07-27 06:18:33 +00:00
HeaderMap.cpp Dont cast away const needlessly. Found by gcc48 -Wcast-qual. 2012-09-06 15:59:27 +00:00
HeaderSearch.cpp Introduce inferred framework modules into the module map file, 2012-11-06 19:39:40 +00:00
Lexer.cpp Fix an assertion failure printing the unused-label fixit in files using CRLF line endings. <rdar://problem/12639047>. 2012-11-14 01:28:38 +00:00
LiteralSupport.cpp LiteralSupport: Don't overflow the temporary buffer when decoding invalid string parts. 2012-11-08 19:22:31 +00:00
MacroArgs.cpp StringRef'ize Preprocessor::CreateString(). 2012-09-24 21:07:17 +00:00
MacroArgs.h Fixed exapnsion range for # and ##. 2011-10-03 18:39:03 +00:00
MacroInfo.cpp Suppress elided variadic macro argument extension diagnostic for macros using 2012-11-14 02:18:46 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
ModuleMap.cpp Remove C++11-isms I just introduced in r167482 2012-11-06 19:41:11 +00:00
PPCaching.cpp [preprocessor] In Preprocessor::CachingLex() check whether there were more tokens 2012-04-04 02:57:01 +00:00
PPCallbacks.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PPDirectives.cpp Suppress elided variadic macro argument extension diagnostic for macros using 2012-11-14 02:18:46 +00:00
PPExpressions.cpp Change the wording of the extension warning from 2012-09-24 18:19:21 +00:00
PPLexerChange.cpp Make preprocessor act in a GCC-compatible fashion when a macro is redefined 2012-08-30 13:38:46 +00:00
PPMacroExpansion.cpp Suppress elided variadic macro argument extension diagnostic for macros using 2012-11-14 02:18:46 +00:00
PTHLexer.cpp Fix dead store found by static analyzer. 2012-09-16 06:18:45 +00:00
Pragma.cpp Removed an extra blank line. 2012-10-24 15:12:40 +00:00
PreprocessingRecord.cpp [preprocessing record] Have PPEntityID be independent of the size of the 2012-10-05 00:22:28 +00:00
Preprocessor.cpp Teach the preprocessor to hold onto the preprocessor options. 2012-10-24 17:46:57 +00:00
PreprocessorLexer.cpp Revert r167801, "[preprocessor] When #including something that contributes no 2012-11-13 19:12:37 +00:00
ScratchBuffer.cpp Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset. 2011-09-19 20:40:19 +00:00
TokenConcatenation.cpp Add missing cctype includes. 2012-08-10 10:58:18 +00:00
TokenLexer.cpp Improved support for removing the comma preceding __VA_ARGS__ where __VA_ARGS__ 2012-11-09 13:24:30 +00:00