- Mar 02, 2017
-
-
Dominic Chen authored
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296835 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
a generally useful utility for other frontends. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296806 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
Reviewed by Artem Dergachev (D26030)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296781 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296779 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
debug info. Suggested by Paul Robinson in feedback on r296488, thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296776 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
When we are deciding whether we are creating a PCH or a module, we would check if the ModuleMgr had any elements to switch into PCH mode. However, when creating a module, the size may be 1. This would result in us going down the wrong path. This was found by cross-compiling the swift standard library. Use the PCH chain length instead to identify the PCH mode. Unfortunately, I have not yet been able to create a simple test case for this, but have verified that this fixes the swift standard library construction. Thanks to Adrian Prantl for help and discussions with this change! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296769 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296749 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: This patch makes the namespace comment fixer use the number of unwrapped lines that a namespace spans to detect it that namespace is short, thus not needing end comments to be added. This is needed to ensure clang-format is idempotent. Previously, a short namespace was detected by the original source code lines. This has the effect of requiring two runs for this example: ``` namespace { class A; } ``` after first run: ``` namespace { class A; } ``` after second run: ``` namespace { class A; } // namespace ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30528 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296736 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 01, 2017
-
-
Daniel Jasper authored
Before: return { a, b: 'b', c, }; After: return { a, b: 'b', c, }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296664 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Many things were wrong: - We didn't always allow wrapping after "as", which can be necessary. - We used to Undestand the identifier after "as" as a start of a name. - We didn't properly parse the structure of the expression with "as" having the precedence of relational operators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296659 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
This is a stopgap fix for PR31863, a regression introduced in r276159. Consider this snippet: struct FVector; struct FVector {}; struct FBox { FVector Min; FBox(int); }; namespace { FBox InvalidBoundingBox(0); } While parsing the DECL_VAR for 'struct FBox', clang recursively read all the dep decls until it finds the DECL_CXX_RECORD forward declaration for 'struct FVector'. Then, it resumes all the way up back to DECL_VAR handling in `ReadDeclRecord`, where it checks if `isConsumerInterestedIn` for the decl. One of the condition for `isConsumerInterestedIn` to return false is if the VarDecl is imported from a module `D->getImportedOwningModule()`, because it will get emitted when we import the relevant module. However, before checking if it comes from a module, clang checks if `Ctx.DeclMustBeEmitted(D)`, which triggers the emission of 'struct FBox'. Since one of its fields is still incomplete, it crashes. Instead, check if `D->getImportedOwningModule()` is true before calling `Ctx.DeclMustBeEmitted(D)`. Differential Revision: https://reviews.llvm.org/D29753 rdar://problem/30173654 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296656 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
and the nature of a declaration This commit adds an external_source_symbol attribute to Clang. This attribute specifies that a declaration originates from an external source and describes the nature of that source. This attribute will be used to improve IDE features like 'jump-to-definition' for mixed-language projects or project that use auto-generated code. rdar://30423368 Differential Revision: https://reviews.llvm.org/D29819 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296649 91177308-0d34-0410-b5e6-96231b3b80d8
-
Charles Li authored
Changed "declerations" to "declarations" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296648 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
In the following code involving GNU statement-expression extension: struct S { ~S(); }; void foo() { const S &x = ({ return; S(); }); } function 'foo()' returns before reference x is initialized. We shouldn't call the destructor for the temporary object lifetime-extended by 'x' in this case, because the object never gets constructed in the first place. The real problem is probably in the CFG somewhere, so this is a quick-and-dirty hotfix rather than the perfect solution. A patch by Artem Dergachev! rdar://problem/30759076 Differential Revision: https://reviews.llvm.org/D30499 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296646 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296638 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: This patch enables namespace end comments under a new flag FixNamespaceComments, which is enabled for the LLVM and Google styles. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30405 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296632 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: An AtomicChange is used to create and group a set of source edits, e.g. replacements or header insertions. Edits in an AtomicChange should be related, e.g. replacements for the same type reference and the corresponding header insertion/deletion. An AtomicChange is uniquely identified by a key position and will either be fully applied or not applied at all. The key position should be the location of the key syntactical element that is being changed, e.g. the call to a refactored method. Next step: add a tool that applies AtomicChange. Reviewers: klimek, djasper Reviewed By: klimek Subscribers: alexshap, cfe-commits, djasper, mgorny Differential Revision: https://reviews.llvm.org/D27054 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296616 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296608 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Those blocks are used if C++ code is SWIG-wrapped (see swig.org) and usually do not contain C++ code. Also cleanup the implementation of for #if 0 and #if false a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296605 91177308-0d34-0410-b5e6-96231b3b80d8
-
Malcolm Parsons authored
Summary: Don't warn about unused lambda captures that involve copying a value of a type that cannot be trivially copied and destroyed. Fixes PR31977 Reviewers: rsmith, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30327 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296602 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
potential capture list. Fix Sema::getCurLambda() to return the innermost lambda scope when there is a block enclosed in the lambda. Previously, the method would return a nullptr in such cases, which would prevent a variable captured by the enclosed block to be added to the lambda scope's potential capture list. rdar://problem/28412462 Differential Revision: https://reviews.llvm.org/D25556 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296584 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
The exisiting warning for inconsistent overrides does not include the destructor as it was noted in review that it was too noisy. Instead, add to a separate warning group that is off by default for users who want consistent warnings between methods and destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296572 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
Fix a crash in the ObjCPropertyChecker when analyzing a 'copy' property of an NSMutable* type in a protocol. rdar://problem/30766684 Differential Revision: https://reviews.llvm.org/D30482 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296562 91177308-0d34-0410-b5e6-96231b3b80d8
-
Paul Robinson authored
Reapplies r296209 now that r296549 has fixed what really seems to be the last problematic test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296554 91177308-0d34-0410-b5e6-96231b3b80d8
-
Charles Li authored
Differential Revision: https://reviews.llvm.org/D30430 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296549 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 28, 2017
-
-
Richard Trieu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296521 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
permits typedef union __attribute__((transparent_union)) {...} Differential Revision: https://reviews.llvm.org/D28266 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296518 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: public enum VeryLongEnum { ENUM_WITH_MANY_PARAMETERS("aaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbb", "ccccccccccccccccccc") , SECOND_ENUM("a", "b", "c"); private VeryLongEnum(String a, String b, String c) {} } After: public enum VeryLongEnum { ENUM_WITH_MANY_PARAMETERS("aaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbb", "ccccccccccccccccccc") , SECOND_ENUM("a", "b", "c"); private VeryLongEnum(String a, String b, String c) {} } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296499 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
Migrate all of aarch64-linux-gnu to \01_mcount instead of just when passing along gnueabi as this matches both gcc and what the kernel expects. More of PR27311 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296490 91177308-0d34-0410-b5e6-96231b3b80d8
-
Tom Stellard authored
- remove path to dts-1.x (corresponds to gcc 4.7) - add path to dts-6 (corresponds to 6.x) Patch By: Maria Gottschalk Differential Revision: https://reviews.llvm.org/D29855 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296485 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Marjamaki authored
Differential Revision: https://reviews.llvm.org/D30192 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296477 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Probst authored
Summary: Also limits the blacklisting to only apply when the tag is actually followed by a parameter in curly braces. /** @mods {long.type.must.not.wrap} */ vs /** @const this is a long description that may wrap. */ Reviewers: djasper Subscribers: klimek, krasimir, cfe-commits Differential Revision: https://reviews.llvm.org/D30452 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296467 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
MSYS' tools don't do globbing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296460 91177308-0d34-0410-b5e6-96231b3b80d8
-
Christof Douma authored
The option -mexecute-only is translated into the backend option -arm-execute-only. But this option only makes sense for the compiler and the assembler does not recognize it. This patch stops clang from passing this option to the assembler. Change-Id: I4f4cb1162c13cfd50a0a36702a4ecab1bc0324ba Review: https://reviews.llvm.org/D30414 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296454 91177308-0d34-0410-b5e6-96231b3b80d8
-
Haojian Wu authored
The begining command "rm" will return 1 when there is not such file to delete. This patch is to remove it, as it's not needed for the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296453 91177308-0d34-0410-b5e6-96231b3b80d8
-
Brad Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296430 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dominic Chen authored
This reverts commit 1b28d0b1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296422 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dominic Chen authored
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296414 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 27, 2017
-
-
Nico Weber authored
Second attempt after http://llvm.org/viewvc/llvm-project?rev=296166&view=rev In the first attempt, Code (the memory buffer backing the input file) was reset before overwriteChangedFiles() was called, but overwriteChangedFiles() still reads from it. This time, load the whole input file into memory instead of using mmap when formatting in-place. (Since the test is identical to what was in the repo before chapuni's revert, svn diff doesn't show it – see the above link for the test.) https://reviews.llvm.org/D30385 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296408 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
When clang emits an inheriting C++ constructor it may inline code during the CodeGen phase. This patch ensures that any debug info in this inlined code gets a proper inlined location. Otherwise we can end up with invalid debug info metadata, since all inlined local variables and function arguments would be reparented into the call site. Analogous to ApplyInlineLocation this patch introduces a ApplyInlineDebugLocation scoped helper to facilitate entering an inlined scope and cleaning up afterwards. This fixes one of the issues discovered in PR32042. rdar://problem/30679307 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296388 91177308-0d34-0410-b5e6-96231b3b80d8
-