summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/macro_fn.c
Commit message (Collapse)AuthorAgeFilesLines
* Add new diagnostic messages when too many arguments are presented to aRichard Trieu2013-07-231-2/+3
| | | | | | | | | | | | | function-like macro. Clang will attempt to correct the arguments by detecting braced initializer lists: 1) If possible, suggest parentheses around arguments containing braced lists which will give the proper number of arguments. 2) If a braced list is detected at the start of a macro argument, it cannot be corrected by parentheses. Instead, just point out the location of these braced lists. llvm-svn: 186971
* [preprocessor] For errors at a function macro invocation, also includeArgyrios Kyrtzidis2012-12-141-3/+3
| | | | | | a note about where the macro is defined. llvm-svn: 170228
* Suppress elided variadic macro argument extension diagnostic for macros usingEli Friedman2012-11-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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
* Minor improvements to some C99 variadic-macro-related diagnostics.Richard Smith2012-06-221-9/+9
| | | | llvm-svn: 159054
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* fix rdar://6816766 - Crash with function-like macro test at end of directive.Chris Lattner2009-04-241-0/+6
| | | | llvm-svn: 69964
* fix the second half of PR4006 and rdar://6807000 by treatingChris Lattner2009-04-201-1/+8
| | | | | | | () as being either zero arguments or one empty argument depending on situation. llvm-svn: 69627
* Fix PR4006, incorrect handling of __VA_ARGS__ when it was the first tokenChris Lattner2009-04-191-0/+6
| | | | | | | in a function-like macro body. This has the added bonus of moving some function-like macro specific code out of the object-like macro codepath. llvm-svn: 69530
* Substantially restructure function-like macro argument parsing.Chris Lattner2009-04-181-0/+27
Highlights: PP::isNextPPTokenLParen() no longer eats the ( when present. We now simplify slightly the logic parsing macro arguments. We now handle PR3937 and other related cases correctly. llvm-svn: 69411
OpenPOWER on IntegriCloud