summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Lex
Commit message (Collapse)AuthorAgeFilesLines
* Avoid having "using namespace" for both "clang" and "llvm" namespaces.Alexey Samsonov2014-10-151-6/+5
| | | | | | | This is fragile, as there are classes with the same name in both namespaces (e.g. llvm::Module and clang::Module). llvm-svn: 219855
* Unique_ptrify PPCallbacks ownership.Craig Topper2014-09-102-3/+3
| | | | | | Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
* unique_ptrify SourceManager::createFileIDDavid Blaikie2014-08-293-4/+4
| | | | llvm-svn: 216715
* Update for LLVM api change.Rafael Espindola2014-08-273-8/+9
| | | | llvm-svn: 216585
* [CMake] LexTests: Prune redundant libdep(s).NAKAMURA Takumi2014-07-241-1/+0
| | | | llvm-svn: 213853
* Use non-intrusive refcounting for TargetOptionsAlp Toker2014-07-063-12/+10
| | | | llvm-svn: 212388
* Track IntrusiveRefCntPtr::get() changes from LLVM r212366Alp Toker2014-07-053-5/+5
| | | | llvm-svn: 212369
* [C++11] Use 'nullptr'. Unittests edition.Craig Topper2014-06-083-7/+7
| | | | llvm-svn: 210423
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-042-2/+0
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. llvm-svn: 210145
* SourceManager: Use setMainFileID() consistentlyAlp Toker2014-05-213-4/+4
| | | | | | | | | | | Eliminate createMainFileID() / createMainFileIDForMemBuffer() utility functions. These didn't add much convenience and conflated two distinct operations. This change makes things easier to follow by providing a consistent interface and getting rid of a bunch of cast-to-voids. llvm-svn: 209266
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-101-0/+1
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* Eliminate ASTContext's DelayInitialization flagAlp Toker2014-05-031-2/+4
| | | | | | | | | Having various possible states of initialization following construction doesn't add value here. Also remove the unused size_reserve parameter. llvm-svn: 207897
* Reformat code following Preprocessor constructor updatesAlp Toker2014-05-023-13/+11
| | | | | | Landing this separately to make the previous commits easy to follow at home. llvm-svn: 207826
* Factor TargetInfo pointer/DelayInitialization bool pair out of Preprocessor ctorAlp Toker2014-05-023-12/+10
| | | | | | | | The Preprocessor::Initialize() function already offers a clear interface to achieve this, further reducing the confusing number of states a newly constructed preprocessor can have. llvm-svn: 207825
* Quick fix for layering that broke shared library build.John Thompson2014-04-233-27/+33
| | | | llvm-svn: 207011
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-235-2/+12
| | | | | | symbols in non-imported modules. llvm-svn: 206977
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-2/+2
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-101-1/+9
| | | | | | CMakeLists.txt. llvm-svn: 196916
* Use the same SourceManager for ModuleMaps and compilations.Manuel Klimek2013-10-243-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows using virtual file mappings on the original SourceManager to map in virtual module.map files. Without this patch, the ModuleMap search will find a module.map file (as the FileEntry exists in the FileManager), but will be unable to get the content from the SourceManager (as ModuleMap previously created its own SourceManager). Two problems needed to be fixed which this patch exposed: 1. Storing the inferred module map When writing out a module, the ASTWriter stores the names of the files in the main source manager; when loading the AST again, the ASTReader errs out if such a file is found missing, unless it is overridden. Previously CompilerInstance's compileModule method would store the inferred module map to a temporary file; the problem with this approach is that now that the module map is handled by the main source manager, the ASTWriter stores the name of the temporary module map as source to the compilation; later, when the module is loaded, the temporary file has already been deleted, which leads to a compilation error. This patch changes the inferred module map to instead inject a virtual file into the source manager. This both saves some disk IO, and works with how the ASTWriter/ASTReader handle overridden source files. 2. Changing test input in test/Modules/Inputs/* Now that the module map file is handled by the main source manager, the VerifyDiagnosticConsumer will not ignore diagnostics created while parsing the module map file. The module test test/Modules/renamed.m uses -I test/Modules/Inputs and triggers recursive loading of all module maps in test/Modules/Inputs, some of which had conflicting names, thus leading errors while parsing the module maps. Those diagnostics already occur on trunk, but before this patch they would not break the test, as they were ignored by the VerifyDiagnosticConsumer. This patch thus changes the module maps that have been recently introduced which broke the invariant of compatible modules maps in test/Modules/Inputs. llvm-svn: 193314
* Fix use-after-free in PPCallbacksTest detected by ASan bootstrap botAlexey Samsonov2013-10-141-4/+4
| | | | llvm-svn: 192572
* Callback support for OpenCL extension pragmas.Pekka Jaaskelainen2013-10-123-3/+104
| | | | | | Patch from Rami Ylimäki and Mikael Lepistö! llvm-svn: 192531
* Include Path.h instead of PathV2.h.Rafael Espindola2013-06-111-1/+1
| | | | | | I am about to move PathV2.h to Path.h. llvm-svn: 183795
* [Lexer] Improve Lexer::getSourceText() when the given range deals with ↵Argyrios Kyrtzidis2013-05-161-55/+225
| | | | | | | | function macro arguments. This is a modified version of a patch by Manuel Klimek. llvm-svn: 182055
* <rdar://problem/12368093> Extend module maps with a 'conflict' declaration, ↵Douglas Gregor2013-03-203-3/+6
| | | | | | and warn when a newly-imported module conflicts with an already-imported module. llvm-svn: 177577
* For ModuleLoader::makeModuleVisible() also pass the source location where theArgyrios Kyrtzidis2013-02-013-3/+6
| | | | | | module import occurred. llvm-svn: 174191
* [Lex] Remove DirectoryLookup.UserSpecified, which is unused.Daniel Dunbar2013-01-251-1/+1
| | | | llvm-svn: 173409
* clang/unittests: Fixup corresponding to r172290.NAKAMURA Takumi2013-01-123-0/+9
| | | | llvm-svn: 172295
* Really sort the #include lines in unittests/...Chandler Carruth2012-12-042-2/+2
| | | | | | I forgot to re-sort after fixing main module headers. llvm-svn: 169244
* Sort the #include lines for unittests/...Chandler Carruth2012-12-043-13/+10
| | | | | | I've tried to place sensible headers at the top as main-module headers. llvm-svn: 169243
* clang/Lex: [CMake] Update CMakefiles since r169229.NAKAMURA Takumi2012-12-041-1/+1
| | | | llvm-svn: 169233
* Refactor recording the preprocessor conditional directive regions out ofArgyrios Kyrtzidis2012-12-041-22/+23
| | | | | | | | | PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. llvm-svn: 169229
* Fix unit tests for ModuleLoader change in r168961.Douglas Gregor2012-11-303-12/+15
| | | | llvm-svn: 168962
* clang/unittests: Fixup corresponding to Doug's r168136.NAKAMURA Takumi2012-11-163-3/+3
| | | | llvm-svn: 168137
* Escape trigraphs in unittest.Benjamin Kramer2012-11-031-6/+4
| | | | llvm-svn: 167359
* Make the FilenameRange of the InclusionDirective callback more accurate,Argyrios Kyrtzidis2012-11-012-0/+249
| | | | | | | | preserve the macro location of the range end if the filename came from a macro. Patch by Kim Gräsman! llvm-svn: 167239
* Teach the preprocessor to hold onto the preprocessor options.Douglas Gregor2012-10-242-4/+4
| | | | llvm-svn: 166599
* Update unit tests for HeaderSearch changeDouglas Gregor2012-10-242-2/+6
| | | | llvm-svn: 166584
* One last unit-test fixDouglas Gregor2012-10-231-1/+2
| | | | llvm-svn: 166513
* More unit-test fixesDouglas Gregor2012-10-231-0/+1
| | | | llvm-svn: 166511
* Fixup unit tests for DiagnosticOptions changeDouglas Gregor2012-10-231-1/+1
| | | | llvm-svn: 166509
* Fix the handling of target options in our unit tests.Douglas Gregor2012-10-172-8/+12
| | | | llvm-svn: 166079
* Clang side of a refactoring of the CMake unit test build strategy.Chandler Carruth2012-06-211-0/+8
| | | | | | | | | | | | | | | | The fundamental change is to put a CMakeLists.txt file in the unittest directory, with a single test binary produced from it. This has several advantages. Among other fundamental advantages, we start to get the checking logic for when a file is missing from the CMake build, and this caught one missing file already! More fun details in the LLVM commit corresponding to this one. Note that the LLVM commit and this one most both be applied, or neither. Sorry for any skew issues. llvm-svn: 158910
* get rid of an unsued variable warning.Fariborz Jahanian2012-03-061-1/+1
| | | | llvm-svn: 152146
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-2/+2
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* [preprocessor] Enhance PreprocessingRecord to keep track of locations of ↵Argyrios Kyrtzidis2012-03-051-0/+139
| | | | | | | | | conditional directives. Introduce PreprocessingRecord::rangeIntersectsConditionalDirective() which returns true if a given range intersects with a conditional directive block. llvm-svn: 152018
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-201-2/+2
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* Change Lexer::makeFileCharRange() to have it accept a CharSourceRangeArgyrios Kyrtzidis2012-02-031-11/+13
| | | | | | | instead of a SourceRange, and handle the case where the range is a char (not token) range. llvm-svn: 149677
* Thread a TargetInfo through to the module map; we'll need it forDouglas Gregor2012-01-301-1/+1
| | | | | | target-specific module requirements. llvm-svn: 149224
* Improve Lexer::getImmediateMacroName to take into account inner macrosArgyrios Kyrtzidis2012-01-231-2/+21
| | | | | | | | | of macro arguments. For "MAC1( MAC2(foo) )" and location of 'foo' token it would return "MAC1" instead of "MAC2". llvm-svn: 148704
* Enhance Lexer::makeFileCharRange to check for ranges inside a macro argumentArgyrios Kyrtzidis2012-01-201-2/+34
| | | | | | | expansion, in which case it returns a file range in the location where the argument was spelled. llvm-svn: 148551
OpenPOWER on IntegriCloud