- Sep 17, 2015
-
-
Devin Coughlin authored
The analyzer trims unnecessary nodes from the exploded graph before reporting path diagnostics. However, in some cases it can trim all nodes (including the error node), leading to an assertion failure (see https://llvm.org/bugs/show_bug.cgi?id=24184). This commit addresses the issue by adding two new APIs to CheckerContext to explicitly create error nodes. Unless the client provides a custom tag, these APIs tag the node with the checker's tag -- preventing it from being trimmed. The generateErrorNode() method creates a sink error node, while generateNonFatalErrorNode() creates an error node for a path that should continue being explored. The intent is that one of these two methods should be used whenever a checker creates an error node. This commit updates the checkers to use these APIs. These APIs (unlike addTransition() and generateSink()) do not take an explicit Pred node. This is because there are not any error nodes in the checkers that were created with an explicit different than the default (the CheckerContext's Pred node). It also changes generateSink() to require state and pred nodes (previously these were optional) to reduce confusion. Additionally, there were several cases where checkers did check whether a generated node could be null; we now explicitly check for null in these places. This commit also includes a test case written by Ying Yi as part of http://reviews.llvm.org/D12163 (that patch originally addressed this issue but was reverted because it introduced false positive regressions). Differential Revision: http://reviews.llvm.org/D12780 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247859 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 15, 2015
-
-
Piotr Padlewski authored
For more goto: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html http://reviews.llvm.org/D12312 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247723 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hans Wennborg authored
This is to follow up on David's comment in http://reviews.llvm.org/D12422#235509 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247718 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
lookup for the UsingShadowDecls themselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247714 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then ``` if (__kmpc_cancel_barrier()) exit from outer construct; ``` code is generated. Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247681 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bader authored
Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247676 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
for an existing entity, and as such a using-declaration doesn't need to conflict with a hidden entity (nor vice versa). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247654 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
In Objective-C, method calls with nil receivers are essentially no-ops. They do not fault (although the returned value may be garbage depending on the declared return type and architecture). Programmers are aware of this behavior and will complain about a false alarm when the analyzer diagnoses API violations for method calls when the receiver is known to be nil. Rather than require each individual checker to be aware of this behavior and suppress a warning when the receiver is nil, this commit changes ExprEngineObjC so that VisitObjCMessage skips calling checker pre/post handlers when the receiver is definitely nil. Instead, it adds a new event, ObjCMessageNil, that is only called in that case. The CallAndMessageChecker explicitly cares about this case, so I've changed it to add a callback for ObjCMessageNil and moved the logic in PreObjCMessage that handles nil receivers to the new callback. rdar://problem/18092611 Differential Revision: http://reviews.llvm.org/D12123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247653 91177308-0d34-0410-b5e6-96231b3b80d8
-
Piotr Padlewski authored
Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479 and other bug caused in chrome. After this patch got reverted because of ScalarEvolution bug (D12719) Merged after John McCall big patch (Added Address). http://reviews.llvm.org/D11859 http://reviews.llvm.org/D12865 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247646 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 14, 2015
-
-
Dan Gohman authored
This makes int_fast64_t and int_least64_t the same type as int64_t, and eliminates a difference between wasm32 and wasm64. Differential Revision: http://reviews.llvm.org/D12861 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247622 91177308-0d34-0410-b5e6-96231b3b80d8
-
Andrey Bokhanko authored
MS compiler ignores calling convention modifiers for structors. This patch makes clang do the same (for MS ABI). This fixes PR24595 and makes vswriter.h header (from Windows SDK 8.1) compilable. Differential Revision: http://reviews.llvm.org/D12402 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247619 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rachel Craik authored
Summary: Implement DR262 (for C). This patch will mainly affect bitfields of type _Bool Reviewers: fraggamuffin, rsmith Subscribers: hubert.reinterpretcast, cfe-commits Differential Revision: http://reviews.llvm.org/D10018 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247618 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
T in the expression T() must be a non-array complete object type or the void type. Function types are neither. This fixes PR24798. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247535 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 11, 2015
-
-
Argyrios Kyrtzidis authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247468 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
Add an option (-analyzer-config min-blocks-for-inline-large=14) to control the function size the inliner considers as large, in relation to "max-times-inline-large". The option defaults to the original hard coded behaviour, which I believe should be adjustable with the other inlining settings. The analyzer-config test has been modified so that the analyzer will reach the getMinBlocksForInlineLarge() method and store the result in the ConfigTable, to ensure it is dumped by the debug checker. A patch by Sean Eveson! Differential Revision: http://reviews.llvm.org/D12406 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247463 91177308-0d34-0410-b5e6-96231b3b80d8
-
Argyrios Kyrtzidis authored
This was not working correctly, leading to erroneously rejecting valid edits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247462 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
-force-align-stack. Also, make changes to the driver so that -mno-stack-realign is no longer an option exposed to the end-user that disallows stack realignment in the backend. Differential Revision: http://reviews.llvm.org/D11815 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247451 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
Differential Revision: http://reviews.llvm.org/D12767 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247430 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
Differential Revision: http://reviews.llvm.org/D12652 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247426 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Fixed HasDeclarationMatcher to properly convert all types into decls where possible. Added objcObjectPointerType(), objcInterfaceDecl(), templateTypeParmType(), injectedClassNameType(), and unresolvedUsingTypenameDecl(). Updated documentation for pointerType() to call out that it does not match ObjCObjectPointerType types. Changed pointsTo() to handle ObjCObjectPointerType as well as PointerType. While this may seem like a lot of unrelated changes, they all relate back to fixing HasDeclarationMatcher. This now allows us to write a matcher like: varDecl(hasType(namedDecl(hasName("Foo")))) that matches code using typedefs, objc interfaces, template type parameters, injected class names, or unresolved using typenames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247404 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Summary: This fixs the bug https://llvm.org/bugs/show_bug.cgi?id=12587 Patch by Yunlian Jiang Reviewers: Bigcheese, rnk Differential Revision: http://reviews.llvm.org/D10279 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247351 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 10, 2015
-
-
Artem Belevich authored
Link in and internalize the symbols we need from supplied bitcode library. Differential Revision: http://reviews.llvm.org/D11664 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247317 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247286 91177308-0d34-0410-b5e6-96231b3b80d8
-
Igor Breger authored
AVX-512: Changed nidx parameter in extractf64/32 intrinsic from i8 to i32 according to the Intel Spec Differential Revision: http://reviews.llvm.org/D12752 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247277 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Collingbourne authored
This flag causes the compiler to emit bit set entries for functions as well as runtime bitset checks at indirect call sites. Depends on the new function bitset mechanism. Differential Revision: http://reviews.llvm.org/D11857 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247238 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mehdi Amini authored
This reapply a variant commit r247179 after post-commit review from D.Blaikie. Hopefully I got it right this time: lifetime of initializer list ends as with any expression, which make invalid the pattern: ArrayRef<int> Arr = { 1, 2, 3, 4}; Just like StringRef, ArrayRef shouldn't be used to initialize local variable but only as function argument. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247233 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 09, 2015
-
-
Nathan Wilson authored
Summary: Diagnose variable and function concept declarations when an invalid specifier appears Reviewers: rsmith, aaron.ballman, faisalv, fraggamuffin, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12435 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247194 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mehdi Amini authored
This reverts commit r247179. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247183 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mehdi Amini authored
From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247179 91177308-0d34-0410-b5e6-96231b3b80d8
-
Michael Zolotukhin authored
Summary: Currently clang provides no general way to generate nontemporal loads/stores. There are some architecture specific builtins for doing so (e.g. in x86), but there is no way to generate non-temporal store on, e.g. AArch64. This patch adds generic builtins which are expanded to a simple store with '!nontemporal' attribute in IR. Differential Revision: http://reviews.llvm.org/D12313 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247104 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
Revert "[Static Analyzer] BugReporter.cpp:2869: Assertion failed: !RemainingNodes.empty() && "No error node found in the trimmed graph"" This is making our internal build bot fail because it results in extra warnings being emitted past what should be sink nodes. (There is actually an example of this in the updated malloc.c test in the reverted commit.) I'm working on a patch to fix the original issue by adding a new checker API to explicitly create error nodes. This API will ensure that error nodes are always tagged in order to prevent them from being reclaimed. This reverts commit r246188. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247103 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 08, 2015
-
-
Richard Smith authored
them directly to the control block. These are fairly large, and in a build with lots of modules / chained PCH, we don't need to read most of them. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247055 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
Brings tool start time for a large synthetic test case down from (on my machine) 4 seconds to 0.5 seconds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247018 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
Currently, the documentation for numSelectorArgs includes an incorrect example. It shows a case where an argument of 1 will match a property getter, but a getter will be matched only when N == 0. This diff corrects the documentation and adds a test for numSelectorArgs(0). Patch by Dave Lee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246998 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
Introduce an Address type to bundle a pointer value with an alignment. Introduce APIs on CGBuilderTy to work with Address values. Change core APIs on CGF/CGM to traffic in Address where appropriate. Require alignments to be non-zero. Update a ton of code to compute and propagate alignment information. As part of this, I've promoted CGBuiltin's EmitPointerWithAlignment helper function to CGF and made use of it in a number of places in the expression emitter. The end result is that we should now be significantly more correct when performing operations on objects that are locally known to be under-aligned. Since alignment is not reliably tracked in the type system, there are inherent limits to this, but at least we are no longer confused by standard operations like derived-to-base conversions and array-to-pointer decay. I've also fixed a large number of bugs where we were applying the complete-object alignment to a pointer instead of the non-virtual alignment, although most of these were hidden by the very conservative approach we took with member alignment. Also, because IRGen now reliably asserts on zero alignments, we should no longer be subject to an absurd but frustrating recurring bug where an incomplete type would report a zero alignment and then we'd naively do a alignmentAtOffset on it and emit code using an alignment equal to the largest power-of-two factor of the offset. We should also now be emitting much more aggressive alignment attributes in the presence of over-alignment. In particular, field access now uses alignmentAtOffset instead of min. Several times in this patch, I had to change the existing code-generation pattern in order to more effectively use the Address APIs. For the most part, this seems to be a strict improvement, like doing pointer arithmetic with GEPs instead of ptrtoint. That said, I've tried very hard to not change semantics, but it is likely that I've failed in a few places, for which I apologize. ABIArgInfo now always carries the assumed alignment of indirect and indirect byval arguments. In order to cut down on what was already a dauntingly large patch, I changed the code to never set align attributes in the IR on non-byval indirect arguments. That is, we still generate code which assumes that indirect arguments have the given alignment, but we don't express this information to the backend except where it's semantically required (i.e. on byvals). This is likely a minor regression for those targets that did provide this information, but it'll be trivial to add it back in a later patch. I partially punted on applying this work to CGBuiltin. Please do not add more uses of the CreateDefaultAligned{Load,Store} APIs; they will be going away eventually. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246985 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 05, 2015
-
-
Saleem Abdulrasool authored
Expose the previously unexposed visibility attribute via the python and C bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246931 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 04, 2015
-
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246860 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ed Schouten authored
If we build with -Werror=implicit-function-declaration, only implicit function declarations of non-library functions throw compiler errors. For library functions, we only produce a warning. There is no way to promote both of these cases to an error without promoting other warnings. It makes little sense to introduce an additional compiler flag just to control this specific warning. In my opinion it should just be part of the same group. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246857 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
simplify the implementation a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246830 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246826 91177308-0d34-0410-b5e6-96231b3b80d8
-