summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* De-virtualize a method. It's called through template magic and doesn't ↵Craig Topper2014-03-131-1/+1
| | | | | | override anything. llvm-svn: 203764
* Remove unreachable PragmaCaptured method. It's not a real PPCallback.Craig Topper2014-03-131-10/+0
| | | | llvm-svn: 203759
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-1313-192/+178
| | | | | | class. llvm-svn: 203758
* Dont unconditionally add gcc4.2 include paths on FreeBSD.Roman Divacky2014-03-121-5/+0
| | | | | | Newer FreeBSD doesnt ship with gcc and defaults to using libc++. llvm-svn: 203700
* Check for LLVM_ON_WIN32 instead of _WIN32.Hans Wennborg2014-03-121-3/+3
| | | | | | This is a follow-up to r203624 to address Anton's comment. llvm-svn: 203668
* Add an option -fmodules-validate-system-headersBen Langmuir2014-03-122-3/+9
| | | | | | | | When enabled, always validate the system headers when loading a module. The end result of this is that when these headers change, we will notice and rebuild the module. llvm-svn: 203630
* If a module map is found in a relative -I path, convert the filenames within itRichard Smith2014-03-111-26/+58
| | | | | | | | to absolute paths when building the includes file for the module. Without this, the module build would fail, because the relative paths we were using are not necessarily relative to a directory in our include path. llvm-svn: 203528
* Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacrosRobert Lytton2014-03-101-3/+5
| | | | llvm-svn: 203455
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-092-2/+2
| | | | llvm-svn: 203389
* [libclang] Don't pad the main buffer for the preamble.Argyrios Kyrtzidis2014-03-091-40/+6
| | | | | | | | | Padding does not seem to be useful currently, and it leads to bogus location if an error points to the end of the file. rdar://15836513 llvm-svn: 203370
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-081-4/+3
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* Module [extern_c] attribute: inherit to submodules, don't write 'extern "C"'Richard Smith2014-03-081-2/+2
| | | | | | blocks when building in C mode, and serialize and deserialize the attribute. llvm-svn: 203317
* [C++11] Revert uses of lambdas with array_pod_sort.Benjamin Kramer2014-03-071-5/+6
| | | | | | Looks like GCC implements the lambda->function pointer conversion differently. llvm-svn: 203293
* [C++11] Convert sort predicates into lambdas.Benjamin Kramer2014-03-071-6/+5
| | | | | | No functionality change. llvm-svn: 203289
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-079-81/+67
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with ↵Aaron Ballman2014-03-073-25/+21
| | | | | | iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203278
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-075-18/+18
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-071-3/+2
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203248
* [Preprocessor] Pass TranslationUnitKind to the preprocessor and if it is ↵Argyrios Kyrtzidis2014-03-073-4/+7
| | | | | | | | | | TU_Prefix avoid warning for unused macros. rdar://15034698 llvm-svn: 203213
* Add dependencies from imported modules with -MDBen Langmuir2014-03-072-26/+64
| | | | | | | | 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
* The Visual Studio IDE changed behavior in VS2012. It used to be the case thatYunzhong Gao2014-03-071-1/+3
| | | | | | | | | | | | | | | | the clang diagnostic has to report a column number one less than the correct value in order for the IDE to move the cursor to the expected location. This behavior is changed in VS2012 and VS2013 so that the IDE is now expecting the column number to match the actual source location. Before: source(line, column-1): type: message After: source(line, column): type: message This patch changes -fdiagnostics-format=msvc to match the new VS2012 and VS2013 when fmsc-version is 1700 or greater. Differential Revision: http://llvm-reviews.chandlerc.com/D2949 llvm-svn: 203183
* [OPENMP] Updated comments and _OPENMP macro value for OpenMP 4.0 (for 'omp ↵Alexey Bataev2014-03-061-2/+2
| | | | | | simd' support) llvm-svn: 203114
* [OPENMP] Added option -fopenmp=libiomp5|libgompAlexey Bataev2014-03-061-2/+6
| | | | llvm-svn: 203081
* When building a module from the command line via -emit-module, add an entry toRichard Smith2014-03-052-3/+14
| | | | | | | the module build stack for the module being built, so we can correctly detect recursive module builds. llvm-svn: 203006
* [C++11] Simplify a callback to use a lambda.Richard Smith2014-03-041-18/+2
| | | | llvm-svn: 202897
* Serialized diagnostic severity levels should be stable.Jordan Rose2014-03-031-2/+17
| | | | | | | | | Serialized diagnostics were accidentally using the AST diagnostic level values rather than a dedicated stable enum, so the addition of "remark" broke the reading of existing serialized diagnostics files. I've added a .dia file generated from Xcode 5's Clang to make sure we don't break this in the future. llvm-svn: 202733
* Introduce '-fmodules-user-build-path' which accepts the "canonical" path to ↵Argyrios Kyrtzidis2014-03-031-0/+4
| | | | | | | | | | a user workspace build. This is used to avoid conflicts with user modules with the same name from different workspaces. rdar://16042513 llvm-svn: 202683
* Revert "Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__"David Majnemer2014-03-021-3/+0
| | | | | | | This commit reverts r201037, it's functionality is not needed given the definition of std::max_align_t in libcxx circa r201843. llvm-svn: 202667
* [C++11] Use std::atomic instead of LLVM's.Benjamin Kramer2014-03-022-13/+9
| | | | | | No intended functionality change. llvm-svn: 202652
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-022-3/+3
| | | | llvm-svn: 202639
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-021-1/+1
| | | | llvm-svn: 202625
* Add [extern_c] attribute for modules, allowing a C module to be imported ↵Richard Smith2014-03-021-7/+14
| | | | | | within an extern "C" block in C++ code. llvm-svn: 202615
* [C++11] Replace verbose functors with succinct lambdasBenjamin Kramer2014-03-012-30/+8
| | | | | | No functionality change. llvm-svn: 202590
* Reapply fixed "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-281-1/+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
* Add 'remark' diagnostic type in 'clang'Tobias Grosser2014-02-283-0/+8
| | | | | | | | | | | | | | | | | | | | | | | A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. This patch provides the initial implementation of 'remarks'. It includes the actual definiton of the remark nodes, their printing as well as basic parameter handling. We are reusing the existing diagnostic parameters which means a remark can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade remarks. This patch is by intention minimal in terms of parameter handling. More experience and more discussions will most likely lead to further enhancements in the parameter handling. llvm-svn: 202475
* [ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance ↵Argyrios Kyrtzidis2014-02-281-51/+93
| | | | | | | | | | that created them, this is inherently unsafe. Instead get the diagnostic info into a SourceManager-independent form. llvm-svn: 202471
* Split FileEntry name vs. isValidBen Langmuir2014-02-272-3/+3
| | | | | | | This is a small bit of refactoring in preparation for FileEntry owning the storage for its own name. llvm-svn: 202412
* [ASTUnit] Fix use-after-free bug in ↵Argyrios Kyrtzidis2014-02-274-45/+35
| | | | | | | | | | | | | | | ASTUnit::getMainBufferWithPrecompiledPreamble(). With r197755 we started reading the contents of buffer file entries, but the buffers may point to ASTReader blobs that have been disposed. Fix this by having the CompilerInstance object keep a reference to the ASTReader as well as having the ASTContext keep reference to the ExternalASTSource. This was very difficult to construct a test case for. rdar://16149782 llvm-svn: 202346
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+1
| | | | llvm-svn: 202238
* Add a driver option -ivfsoverlayBen Langmuir2014-02-252-0/+30
| | | | | | | Reads the description of a virtual filesystem from a file and overlays it over the real file system. llvm-svn: 202176
* If preprocessing results in a token with leading whitespace that was expandedRichard Smith2014-02-241-0/+7
| | | | | | | from a macro in column 0, ensure that we print whitespace before it in the -E output. Patch by Harald van Dijk! llvm-svn: 202070
* Implement -fno-short-wcharRichard Barton2014-02-241-1/+1
| | | | llvm-svn: 202058
* Update for llvm api change.Rafael Espindola2014-02-245-10/+11
| | | | llvm-svn: 202053
* Don't assume that F_None is the default. It is about to change.Rafael Espindola2014-02-243-3/+3
| | | | llvm-svn: 202040
* Update __cplusplus to match the value in the C++14 DIS preview (D3937).Richard Smith2014-02-241-3/+5
| | | | llvm-svn: 202003
* [CMake] Resurrect mis-dropped dependency to ClangDriverOptions since r201842.NAKAMURA Takumi2014-02-231-0/+3
| | | | llvm-svn: 201978
* clang: add -f{no-,}integrate-as as consistent parametersSaleem Abdulrasool2014-02-231-1/+1
| | | | | | | | The integrated assembler is a feature. This makes the new flags the default option, and the previous versions aliases. Ideally, at some point the aliases would be entirely removed. llvm-svn: 201963
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-16/+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
* Accept -no-integrated-as in -cc1 and forward it to llvm.Rafael Espindola2014-02-211-0/+1
| | | | llvm-svn: 201837
* Expand macros in pragmas with -fms-extensions and -EReid Kleckner2014-02-201-36/+7
| | | | | | | | | | | | | | gcc never expands macros in pragmas and MSVC always expands macros before processing pragmas. Clang usually allows macro expansion, except in a handful of pragmas, most of which are handled by the lexer. Also remove PPCallbacks for pragmas that are currently handled in the parser. Without a Parser, such as with clang -E, these callbacks would never be called. Fixes PR18576. llvm-svn: 201821
OpenPOWER on IntegriCloud