- Feb 09, 2016
-
-
David Blaikie authored
While this won't help fix things like the bug that r260219 addressed, it seems like good tidy up to have anyway. (it might be nice if "makeArrayRef" always produced a MutableArrayRef & let it decay to an ArrayRef when needed - then I'd use that for the MutableArrayRefs in this patch) If we had std::dynarray I'd use that instead of unique_ptr+size_t, ideally (but then it'd have to be threaded down through the Preprocessor all the way - no idea how painful that would be) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260246 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 02, 2016
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259490 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 31, 2016
-
-
Bruno Cardoso Lopes authored
Consider the following ObjC++ snippet: -- @protocol PA; @protocol PB; @class NSArray<ObjectType>; typedef int some_t; id<PA> FA(NSArray<id<PB>> *h, some_t group); -- This would hit an assertion in the parser after generating an annotation token while trying to update the token cache: Assertion failed: (CachedTokens[CachedLexPos-1].getLastLoc() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token") ... 7 clang::Preprocessor::AnnotatePreviousCachedTokens(clang::Token const&) + 494 8 clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool, clang::CXXScopeSpec&, bool) + 1163 9 clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 361 10 clang::Parser::isCXXDeclarationSpecifier(clang::Parser::TPResult, bool*) + 598 ... The cached preprocessor token in this case is: greatergreater '>>' Loc=<testcase.mm:7:24> while the annotation ("NSArray<id<PB>>") ends at "testcase.mm:7:25", hence the assertion. Properly update the CachedTokens during template parsing to contain two greater tokens instead of a greatergreater. Differential Revision: http://reviews.llvm.org/D15173 rdar://problem/23494277 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259311 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 28, 2016
-
-
Craig Topper authored
There were a couple slight variations between the two copies that I don't believe were intentional. For example, only one of the paths checked for digit separations proceeding a '.', but I think the lexer itself splits the token if a digit separator proceeds a period. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259022 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 26, 2016
-
-
Richard Trieu authored
Move the function to get a macro name from DiagnosticRenderer.cpp to Lexer.cpp so that other files can use it. Lexer now has two functions to get the immediate macro name, the newly added one is better for diagnostic purposes. Make -Wnull-conversion use this function for better NULL macro detection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258778 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 22, 2016
-
-
Ehsan Akhgari authored
Summary: This fixes PR25875. When the trailing comma in a macro argument list is elided, we need to treat it similarly to the case where a variadic macro misses one actual argument. Reviewers: rnk, rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15670 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258530 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 07, 2016
-
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257097 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 30, 2015
-
-
Nico Weber authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256595 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 18, 2015
-
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253440 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 02, 2015
-
-
Reid Kleckner authored
This reduces the number of .cpp files needed to be rebuilt after touching OnDiskHashTable from 120 to 21 for me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251810 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 22, 2015
-
-
Craig Topper authored
Change MacroInfo::setArgumentList to take an ArrayRef instead of pointer and size. While there use std::copy intead of a manual loop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250987 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 20, 2015
-
-
Angel Garcia Gomez authored
Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250827 91177308-0d34-0410-b5e6-96231b3b80d8
-
Angel Garcia Gomez authored
Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250822 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 16, 2015
-
-
Richard Smith authored
Refactor module lookup when looking up a header file, and wire through the requesting module. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250554 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 12, 2015
-
-
Hans Wennborg authored
We already silently ignore the /RTC, which controls the same functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250099 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 24, 2015
-
-
Sanjay Patel authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248537 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 22, 2015
-
-
Artem Belevich authored
* adds -aux-triple option to specify target triple * propagates aux target info to AST context and Preprocessor * pulls in target specific preprocessor macros. * pulls in target-specific builtins from aux target. * sets appropriate host or device attribute on builtins. Differential Revision: http://reviews.llvm.org/D12917 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248299 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 27, 2015
-
-
Adrian Prantl authored
to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246192 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 24, 2015
-
-
Richard Smith authored
[modules] Remove unnecessary deserialization of fully-external HeaderFileInfos for all files we've seen in this compilation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245881 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 19, 2015
-
-
Richard Smith authored
[modules] Fix HeaderFileInfo serialization to store all the known owning modules for a header, not just the current favourite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245390 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 13, 2015
-
-
David Blaikie authored
Wdeprecated: Replace deprecated throw() with LLVM_NOEXCEPT which expands to 'noexcept' where available (and throw() otherwise) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244956 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 09, 2015
-
-
Richard Smith authored
current compilation, not just those from imported modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244413 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 05, 2015
-
-
Douglas Katzman authored
Referring to the groups by mixing the enumerated name with the command-line flag was not as clear as could be. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244150 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 17, 2015
-
-
Adrian Prantl authored
- introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242499 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 14, 2015
-
-
Richard Smith authored
[modules] When diagnosing errors in module map files found by 'extern module' declarations, show how we got to that module map file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242105 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 11, 2015
-
-
Richard Smith authored
visible in the module we're considering entering. Previously we assumed that if we knew the include guard for a modular header, we'd already parsed it, but that need not be the case if a header is present in the current module and one of its dependencies; the result of getting this wrong was that the current module's submodule for the header would end up empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241953 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 02, 2015
-
-
Ben Langmuir authored
We use findModuleForHeader() in several places, but in header search we were not calling it when a framework module didn't show up with the expected name, which would then lead to unexpected non-modular includes. Now we will find the module unconditionally for frameworks. For regular frameworks, we use the spelling of the module name from the module map file, and for inferred ones we use the canonical directory name. In the future we might want to lock down framework modules sufficiently that these name mismatches cannot happen. rdar://problem/20465870 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241258 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 01, 2015
-
-
Richard Smith authored
update the identifier in case we've imported a definition of the macro (and thus the contents of the header) from a module. Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer makes sense to keep these separate now that the only user of the former also needs the latter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241137 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
re-entering a modular header. When we do the include guard check, we're in the visibility state for the file with the #include; the include guard may not be visible there, but we don't actually need it to be: if we've already parsed the submodule we're considering entering, it's always safe to skip it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241135 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 30, 2015
-
-
Richard Smith authored
local submodule visibility enabled; that top-level file might not actually be the module includes buffer if use of prebuilt modules is disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241120 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 25, 2015
-
-
Richard Smith authored
This is exercised by existing tests, and fixes a failure with -fsanitize=null. No observable change otherwise; the code happened to do the right thing in practice under recent versions of Clang and GCC because MacroDirective::getDefinition happens to check whether this == null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240691 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 23, 2015
-
-
Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240353 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 22, 2015
-
-
Alexander Kornienko authored
The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240270 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 19, 2015
-
-
Douglas Gregor authored
Introduce the clang pragmas "assume_nonnull begin" and "assume_nonnull end" in which we make default assumptions about the nullability of many unannotated pointers: - Single-level pointers are inferred to __nonnull - NSError** in a (function or method) parameter list is inferred to NSError * __nullable * __nullable. - CFErrorRef * in a (function or method) parameter list is inferred to CFErrorRef __nullable * __nullable. - Other multi-level pointers are never inferred to anything. Implements rdar://problem/19191042. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240156 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 16, 2015
-
-
Richard Smith authored
We used to have a flag to enable module maps, and two more flags to enable implicit module maps. This is all redundant; we don't need any flag for enabling module maps in the abstract, and we don't usually have -fno- flags for -cc1. We now have just a single flag, -fimplicit-module-maps, that enables implicitly searching the file system for module map files and loading them. The driver interface is unchanged for now. We should probably rename -fmodule-maps to -fimplicit-module-maps at some point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239789 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 12, 2015
-
-
Benjamin Kramer authored
append will resize the vector to the optimal size. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239607 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 11, 2015
-
-
Daniel Marjamaki authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239526 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 10, 2015
-
-
Sean Silva authored
The RequestingModule argument was unused and always its default value of nullptr. Also move a declaration closer to its use, and range-for'ify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239453 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 05, 2015
-
-
Sean Silva authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239123 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 01, 2015
-
-
Rafael Espindola authored
Patch by Косов Евгений! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238774 91177308-0d34-0410-b5e6-96231b3b80d8
-