summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
Commit message (Collapse)AuthorAgeFilesLines
...
* [ubsan] Add support for -fsanitize-blacklistWill Dietz2013-01-181-3/+3
| | | | llvm-svn: 172808
* Revert Clang r172620 and r172629, which caused a hang when buildingDouglas Gregor2013-01-181-5/+9
| | | | | | | complicated modules (<rdar://problem/13038265>). Unfortunately, this un-fixes <rdar://problem/13016031>. llvm-svn: 172783
* Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are ↵Joey Gouly2013-01-171-0/+6
| | | | | | not supported. llvm-svn: 172732
* Remove unnecessary initialization i Added in r172668.David Blaikie2013-01-161-6/+5
| | | | | | | echristo already fixed this in r172649, but I'll leave the reformatting in since I'm in the blame history for it now anyway. llvm-svn: 172672
* Fix -Wreorder warning.David Blaikie2013-01-161-13/+11
| | | | | | Rewrapping courtesy of clang-format. llvm-svn: 172668
* Move initialization of ParsingIfOrElifDirective down next to the macroEric Christopher2013-01-161-4/+3
| | | | | | initializations to fix Wreorder warning. llvm-svn: 172649
* No longer crashing with an assert when __has_include or __has_include_next ↵Aaron Ballman2013-01-163-1/+11
| | | | | | is used outside of a preprocessor directive. This fixes PR14837. llvm-svn: 172639
* [preprocessor] Call the MacroUndefined callback even when the macro was not ↵Argyrios Kyrtzidis2013-01-162-5/+8
| | | | | | | | defined. Patch by Enea Zaffanella! llvm-svn: 172623
* [PCH/Modules] Change how macro [re]definitions are de/serialized.Argyrios Kyrtzidis2013-01-161-9/+5
| | | | | | | | | | | | | | | | | | Previously we would serialize the macro redefinitions as a list, part of the identifier, and try to chain them together across modules individually without having the info that they were already chained at definition time. Change this by serializing the macro redefinition chain and then try to synthesize the chain parts across modules. This allows us to correctly pinpoint when 2 different definitions are ambiguous because they came from unrelated modules. Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH is redefined without undef'ing it first. rdar://13016031 llvm-svn: 172620
* Typo correction; no functional change.Aaron Ballman2013-01-151-1/+1
| | | | llvm-svn: 172555
* Infer "link" lines for top-level frameworks. Essentially, a frameworkDouglas Gregor2013-01-141-0/+30
| | | | | | | | will have a shared library with the same name as its framework (and no suffix!) within its .framework directory. Detect this both when inferring the whole top-level framework and when parsing a module map. llvm-svn: 172439
* Implement parsing, AST, (de-)serialization, and placeholder globalDouglas Gregor2013-01-141-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | metadata for linking against the libraries/frameworks for imported modules. The module map language is extended with a new "link" directive that specifies what library or framework to link against when a module is imported, e.g., link "clangAST" or link framework "MyFramework" Importing the corresponding module (or any of its submodules) will eventually link against the named library/framework. For now, I've added some placeholder global metadata that encodes the imported libraries/frameworks, so that we can test that this information gets through to the IR. The format of the data is still under discussion. llvm-svn: 172437
* Constify argument of Preprocessor::getMacroInfoHistory and propagate toDmitri Gribenko2013-01-141-1/+1
| | | | | | callers, removing unneeded const_cast llvm-svn: 172372
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-128-17/+17
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Rework the realpath nonsense for framework lookups to deal moreDouglas Gregor2013-01-102-102/+139
| | | | | | uniformly with symlinks between top-level and embedded frameworks. llvm-svn: 172030
* [PreprocessingRecord] A macro expansion can be reported out-of-order in ↵Argyrios Kyrtzidis2013-01-091-3/+11
| | | | | | | | | | | | cases when there are macro expansions inside macro arguments where the arguments are not expanded in the same order as listed; don't assert that all macro expansions are in source order. rdar://12397063 llvm-svn: 172018
* Make __has_include a bit more resilient in the presence of macros. ↵Eli Friedman2013-01-091-2/+8
| | | | | | <rdar://problem/12748859>. llvm-svn: 171939
* Pull the bulk of Lexer::MeasureTokenLength() out into a new function,Argyrios Kyrtzidis2013-01-071-5/+15
| | | | | | | | Lexer::getRawToken(). No functionality change. llvm-svn: 171771
* realpath'ify the mapping from header includes to module imports.Douglas Gregor2013-01-041-0/+13
| | | | llvm-svn: 171516
* Add __has_feature support to detect if clang supports the explicit "atomic" ↵Ted Kremenek2013-01-041-0/+1
| | | | | | | | keyword for ObjC properties. Fixes <rdar://problem/12953378>. llvm-svn: 171504
* Add the module name to the 'incomplete umbrella header' warning.Douglas Gregor2013-01-041-1/+1
| | | | llvm-svn: 171497
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-026-59/+59
| | | | llvm-svn: 171367
* [libclang] Fix crash when code-completing a macro invocation thatArgyrios Kyrtzidis2012-12-222-14/+33
| | | | | | reached EOF and did not expand the argument into the source context. llvm-svn: 170980
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | llvm-svn: 170903
* [libclang] Follow-up to r170824, provide the correct number of arguments forArgyrios Kyrtzidis2012-12-211-0/+11
| | | | | | a not-fully-formed macro invocation during code-completion. llvm-svn: 170833
* [libclang] Make sure we can code-complete inside a macro argument even thoughArgyrios Kyrtzidis2012-12-211-14/+26
| | | | | | | | the macro invocation is not fully formed. rdar://11290992 llvm-svn: 170824
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-6/+6
| | | | | | which is wrong here. llvm-svn: 170721
* Add __has_feature(memory_sanitizer).Evgeniy Stepanov2012-12-201-0/+1
| | | | llvm-svn: 170686
* [preprocessor] When "merging" macro argument tokens into one SLocEntry chunk,Argyrios Kyrtzidis2012-12-191-2/+6
| | | | | | | | make sure they came from the same kind of FileIDs. Thanks to Abramo Bagnara for providing the test case. llvm-svn: 170616
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-6/+6
| | | | | | single attribute in the future. llvm-svn: 170500
* tsan: add __has_feature(thread_sanitizer)Dmitry Vyukov2012-12-171-0/+1
| | | | llvm-svn: 170314
* [preprocessor] For errors at a function macro invocation, also includeArgyrios Kyrtzidis2012-12-141-0/+8
| | | | | | a note about where the macro is defined. llvm-svn: 170228
* Don't warn about disabled macro expansion if we see the name of a ↵Richard Smith2012-12-121-4/+3
| | | | | | function-like macro which isn't immediately followed by '('. FreeBSD's stdio.h #defines foo(x) to (foo)(x), apparently. llvm-svn: 169960
* Use @import rather than @__experimental_modules_import, since theDouglas Gregor2012-12-112-3/+3
| | | | | | latter is rather a mess to type. llvm-svn: 169919
* Extend stat query APIs to explicitly specify if the query is forArgyrios Kyrtzidis2012-12-111-2/+2
| | | | | | | | | | a file or directory, allowing just a stat call if a file descriptor is not needed. Doing just 'stat' is faster than 'open/fstat/close'. This has the effect of cutting down system time for validating the input files of a PCH. llvm-svn: 169831
* Return true from HeaderSearch::isFileMultipleIncludeGuarded if the fileArgyrios Kyrtzidis2012-12-101-1/+2
| | | | | | was #import'ed. llvm-svn: 169761
* [libclang] Resolve a cursor that points to a macro name inside a #ifdef/#ifndefArgyrios Kyrtzidis2012-12-081-2/+29
| | | | | | | | | | directive as a macro expansion. This is more of a "macro reference" than a macro expansion but it's close enough for libclang's purposes. If it causes issues we can revisit and introduce a new kind of cursor. llvm-svn: 169666
* [Preprocessor] Enhance Ifdef/Ifndef/Defined preprocessor callbacks to also passArgyrios Kyrtzidis2012-12-083-7/+15
| | | | | | a MacroInfo object if the identifier was a macro name. llvm-svn: 169665
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-0416-58/+57
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* clang/Lex: [CMake] Update CMakefiles since r169229.NAKAMURA Takumi2012-12-041-0/+1
| | | | llvm-svn: 169233
* Refactor recording the preprocessor conditional directive regions out ofArgyrios Kyrtzidis2012-12-043-102/+122
| | | | | | | | | PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. llvm-svn: 169229
* In the PreprocessingRecord, to identify the different conditional directive ↵Argyrios Kyrtzidis2012-12-041-16/+19
| | | | | | | | regions use the SourceLocation at the start of the respective region, instead of a unique integer. llvm-svn: 169228
* Try to make the source location information for token pastes a bit more ↵Eli Friedman2012-12-011-0/+6
| | | | | | | | | consistent. Fixes a crash printing diagnostics on the gcc testsuite, and also makes diagnostic range printing print nicer results for token pastes. llvm-svn: 169068
* Comments: no need to escape any characters in \code ... \endcode.Dmitri Gribenko2012-11-301-6/+6
| | | | llvm-svn: 169030
* Support for #pragma region/endregion for MSVC compatibility. Patch thanks ↵Aaron Ballman2012-11-301-0/+25
| | | | | | to pravic! llvm-svn: 169028
* Keep track of modules that have failed to build. If we encounter anDouglas Gregor2012-11-291-1/+8
| | | | | | | | | | | | import of that module elsewhere, don't try to build the module again: it won't work, and the experience is quite dreadful. We track this information somewhat globally, shared among all of the related CompilerInvocations used to build modules on-the-fly, so that a particular Clang instance will only try to build a given module once. Fixes <rdar://problem/12552849>. llvm-svn: 168961
* Remove obsolete comment missed by r162937Andy Gibbs2012-11-281-4/+0
| | | | llvm-svn: 168778
* Teach Lexer::getSpelling about raw string literals. Specifically, if a rawRichard Smith2012-11-281-42/+67
| | | | | | | | string literal needs cleaning (because it contains line-splicing in the encoding prefix or in the ud-suffix), do not clean the section between the double-quotes -- that's the "raw" bit! llvm-svn: 168776
* Clean up code according to coding standardsAndy Gibbs2012-11-171-3/+2
| | | | llvm-svn: 168274
* Fix crash on end-of-file after \ in a char literal, fixes PR14369.Nico Weber2012-11-171-6/+8
| | | | | | | This makes LexCharConstant() look more like LexStringLiteral(), which doesn't have this bug. Add tests for eof after \ for several other cases. llvm-svn: 168269
OpenPOWER on IntegriCloud