summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "OnDiskHashTable: Use Endian.h to read little endian ostreams"Justin Bogner2014-03-281-57/+29
| | | | | | This reverts commit r205045. llvm-svn: 205048
* Revert "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"Justin Bogner2014-03-281-1/+0
| | | | | | This reverts commit r205044. llvm-svn: 205047
* OnDiskHashTable: Use Endian.h to read little endian ostreamsJustin Bogner2014-03-281-29/+57
| | | | | | | | | Rather than rolling our own functions to read little endian data from a buffer, we can use the support in llvm's Endian.h. No functional change. llvm-svn: 205045
* OnDiskHashTable: Use EndianStream.h to write little endian ostreamsJustin Bogner2014-03-281-0/+1
| | | | | | | | | Rather than rolling our own functions to write little endian data to an ostream, we can use the support in llvm's EndianStream.h. No functional change. llvm-svn: 205044
* Reverting r204968 and r204969; while more build bots are happy with the ↵Aaron Ballman2014-03-271-3/+15
| | | | | | results, some still have link errors. llvm-svn: 204974
* Reapplying r204952 with fixes which should hopefully resolve linking issues ↵Aaron Ballman2014-03-271-15/+3
| | | | | | with non-MSVC compilers. llvm-svn: 204968
* Reverting r204952, while I figure out what's going on with the makefile build.Aaron Ballman2014-03-271-3/+15
| | | | llvm-svn: 204955
* Clean up the __has_attribute implementation without modifying its behavior. Aaron Ballman2014-03-271-15/+3
| | | | | | | | Replaces the tablegen-driven AttrSpellings.inc, which lived in the lexing layer with AttrHasAttributeImpl.inc, which lives in the basic layer. Updates the preprocessor to call through to this new functionality which can take additional information into account (such as scopes and syntaxes). Expose the ability for parts of the compiler to ask whether an attribute is supported for a given spelling (including scope), syntax, triple and language options. llvm-svn: 204952
* Prevent lookup of subframework modules by name without parent frameworkBen Langmuir2014-03-201-24/+3
| | | | | | | | | | | | | We were 'allowing' the following import @import Sub; where Sub is a subframework of Foo and we had a -F path inside Foo.framework/Frameworks and no module map file for Sub. This would later hit assertion failures in debug builds. Now we should correctly diagnose this as a module not found error. llvm-svn: 204368
* Silencing an MSVC warning about not all control paths returning a value. No ↵Aaron Ballman2014-03-201-0/+1
| | | | | | functional change intended. llvm-svn: 204345
* Add a new spelling for module map files 'module.modulemap'Ben Langmuir2014-03-192-67/+106
| | | | | | | | | | | | | | | This name, while more verbose, plays more nicely with tools that use file extensions to determine file types. The existing spelling 'module.map' will continue to work, but the new spelling will take precedence. In frameworks, this new filename will only go in a new 'Modules' sub-directory. Similarly, add a module.private.modulemap corresponding to module_private.map. llvm-svn: 204261
* Use the expansion location of the file name when finding the module.Manuel Klimek2014-03-191-1/+1
| | | | | | | | The spelling location of stringified strings is not a file location. Optimally, we'll want to solve the problem (as the FIXME states) by handing in the right FileEntry of the #include location. llvm-svn: 204220
* Added a __has_feature() for 'is_constructible'Marshall Clow2014-03-181-0/+1
| | | | llvm-svn: 204153
* Preprocessor: Clarify the ownership of the IncludeMacroStack with unique_ptr.Benjamin Kramer2014-03-151-5/+1
| | | | llvm-svn: 204007
* Implement the MS extension __identifier properly: take a token and strip it ofRichard Smith2014-03-151-6/+47
| | | | | | its keywordliness. llvm-svn: 203987
* Add two missing entries to the C++11 support page. Bump one relevant diagnosticRichard Smith2014-03-141-2/+3
| | | | | | | | (for an integer too large for any signed type) from Warning to ExtWarn -- it's ill-formed in C++11 and C99 onwards, and UB during translation in C89 and C++98. Add diagnostic groups for two relevant diagnostics. llvm-svn: 203974
* Don't verify module inclusions in assembler files.Daniel Jasper2014-03-141-1/+1
| | | | llvm-svn: 203929
* Prevent outputting HeaderFileInfos for files not used as headersBen Langmuir2014-03-131-0/+12
| | | | | | | | | | | When building an AST file, we don't want to output HeaderFileInfo structures for files that are not actually used as headers in the current context. This can lead to assuming that unrelated files have include counts of 0, defeating multiple-include prevention. This is accomplished by adding an IsValid bit to the HFI. llvm-svn: 203813
* Only allow streaming exactly type 'bool' to a DiagnosticBuilder, not anythingRichard Smith2014-03-121-1/+2
| | | | | | | that implicitly converts to 'bool' (such as pointers, and the first operand of ?:). Clean up issues found by this. Patch by Stephan Tolksdorf! llvm-svn: 203735
* Lex: reduce buffer size, add a testSaleem Abdulrasool2014-03-121-1/+1
| | | | | | | Reduce the stack usage as hopefully include paths are usually not too long. Add a test case for the path normalisation behaviour. llvm-svn: 203632
* lex: improve include handling on Linux for WindowsSaleem Abdulrasool2014-03-111-10/+22
| | | | | | | | | | Normalise the path separator character on non-windows platforms. Although this would work on Windows as well (most newer versions of Windows support either '/' or '\' as a path separator character), it could potentially cause problems with full UNC paths. This change enables the use of the Windows SDK on Linux which will not accept '\' as a path separator. llvm-svn: 203614
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-112-35/+35
| | | | | | class. llvm-svn: 203547
* [HeaderSearch] Fix issue where if a headermap entry maps the filename to a ↵Argyrios Kyrtzidis2014-03-111-10/+28
| | | | | | | | | | framework import (non-absolute path) then we fail to find it if it is re-included later on. rdar://16285490 llvm-svn: 203542
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-092-2/+2
| | | | llvm-svn: 203389
* Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s ↵David Blaikie2014-03-091-1/+1
| | | | | | operator== llvm-svn: 203373
* [Preprocessor] Only check for -Wunused-macros if the translation unit kind ↵Argyrios Kyrtzidis2014-03-081-1/+1
| | | | | | is TU_Complete. llvm-svn: 203360
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-072-5/+5
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-073-6/+6
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* [Preprocessor] Pass TranslationUnitKind to the preprocessor and if it is ↵Argyrios Kyrtzidis2014-03-072-6/+12
| | | | | | | | | | TU_Prefix avoid warning for unused macros. rdar://15034698 llvm-svn: 203213
* Add dependencies from imported modules with -MDBen Langmuir2014-03-071-1/+2
| | | | | | | | Add module dependencies to the dependency files created by -MD/-MMD/etc. by attaching an ASTReaderListener that will call into the dependency file generator when a module input file is seen in the serialized AST. llvm-svn: 203208
* Remove a dead store, add a FIXME for another.Richard Smith2014-03-061-0/+1
| | | | llvm-svn: 203169
* Fix use-after-free detected by ASan bootstrap.Richard Smith2014-03-061-2/+7
| | | | llvm-svn: 203140
* If a #include finds a file relative to the current file, don't forget to checkRichard Smith2014-03-052-24/+55
| | | | | | whether it's part of a module. llvm-svn: 203005
* [C++11] Switch from LLVM_STATIC_ASSERT to static_assert now that weChandler Carruth2014-03-021-2/+2
| | | | | | require host toolchains which support this. llvm-svn: 202640
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-022-2/+2
| | | | llvm-svn: 202639
* Add [extern_c] attribute for modules, allowing a C module to be imported ↵Richard Smith2014-03-021-2/+14
| | | | | | within an extern "C" block in C++ code. llvm-svn: 202615
* If a module A exports a macro M, and a module B imports that macro and #undef'sRichard Smith2014-03-012-6/+6
| | | | | | | | | | | | | | it, importers of B should not see the macro. This is complicated by the fact that A's macro could also be visible through a different path. The rules (as hashed out on cfe-commits) are included as a documentation update in this change. With this, the number of regressions in libc++'s testsuite when modules are enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are due to remaining bugs in this change (in particular, the handling of submodules is imperfect). llvm-svn: 202560
* Reapply fixed "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-281-0/+1
| | | | | | | | | | | | | | | | Was r202442 There were two issues with the original patch that have now been fixed. 1. We were memset'ing over a FileEntry in a test case. After adding a std::string to FileEntry, this still happened to not break for me. 2. I didn't pass the FileManager into the new compiler instance in compileModule. This was hidden in some cases by the fact I didn't clear the module cache in the test. Also, I changed the copy constructor for FileEntry, which was memcpy'ing in a (now) unsafe way. llvm-svn: 202539
* Fix a minor bug in lexing pp-numbers with digit separators: if a pp-number ↵Richard Smith2014-02-281-0/+1
| | | | | | contains "'e+", the pp-number ends between the 'e' and the '+'. llvm-svn: 202533
* Revert "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-271-1/+0
| | | | | | Revert r202442, which broke the buildbots. llvm-svn: 202443
* Honour 'use-external-names' in FileManagerBen Langmuir2014-02-271-0/+1
| | | | | | | | Pass through the externally-visible names that we got from the VFS down to FileManager, and test that this is the name showing up in __FILE__, diagnostics, and debug information. llvm-svn: 202442
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+1
| | | | llvm-svn: 202238
* If the first token in a macro that appears at the start of a line expands toRichard Smith2014-02-241-0/+1
| | | | | | | nothing, be sure to inform the *next* token expanded from the macro that it is now at the start of a line. Patch by Harald van Dijk! llvm-svn: 202068
* Use a more conventional logical op instead of bitwise andAlp Toker2014-02-241-1/+1
| | | | llvm-svn: 202006
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-6/+0
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* Recommit virtual file systemBen Langmuir2014-02-201-2/+2
| | | | | | | | | | | Previously reverted in r201755 due to causing an assertion failure. I've removed the offending assertion, and taught the CompilerInstance to create a default virtual file system inside createFileManager. In the future, we should be able to reach into the CompilerInvocation to customize this behaviour without breaking clients that don't care. llvm-svn: 201818
* Reverting the virtual file system implementation, because it triggers an ↵Juergen Ributzka2014-02-201-2/+2
| | | | | | | | | | assertion in our internal build bots. This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696. llvm-svn: 201755
* Use llvm::DeleteContainerSeconds when possibleReid Kleckner2014-02-191-3/+1
| | | | llvm-svn: 201739
* Initial implementation of virtual file systemBen Langmuir2014-02-191-2/+2
| | | | | | | | | | | | This adds the minimum virtual file system support to start migrating FileManager onto the VFS. Originally discussed here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035188.html Differential Revision: http://llvm-reviews.chandlerc.com/D2745 llvm-svn: 201618
* Fix false positives in -Wmsvc-include by continuing header searchReid Kleckner2014-02-181-9/+44
| | | | | | | | | | | This makes Clang and LLVM -Wmsvc-include clean. I believe the correct behavior here is to avoid updating the cache when we find the header via MSVC's search rules. Differential Revision: http://llvm-reviews.chandlerc.com/D2733 llvm-svn: 201615
OpenPOWER on IntegriCloud