Commit Graph

265 Commits

Author SHA1 Message Date
Jordy Rose 537716ad8d [analyzer] Change the check::RegionChanges callback to include the regions explicitly requested for invalidation.
Also, allow CallOrObjCMessage to wrap a CXXConstructExpr as well.

Finally, this allows us to remove the clunky whitelisting system from CFRefCount/RetainReleaseChecker. Slight regression due to CXXNewExprs not yet being handled in post-statement callbacks (PR forthcoming).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138716 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-27 22:51:26 +00:00
Ted Kremenek f1d10d9397 Constify the result of CFGStmt::getStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138408 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23 23:05:04 +00:00
Jordy Rose 38f17d6c86 [analyzer] Move symbol death leak analysis from CFRefCount to RetainReleaseChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138353 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23 19:01:07 +00:00
Ted Kremenek f8b5aae41e [analyzer] Handle reads of ObjCPropertyRefExprs implicitly in Environment. No need to bind an explicit value and create a new node.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138196 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-20 06:23:25 +00:00
Ted Kremenek 294fd0a62b Start partitioning ExprEngine.cpp into separate .cpp files that handle different parts
of the analysis (e.g., analysis of C expressions, analysis of Objective-C expressions, and so on).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138194 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-20 06:00:03 +00:00
Ted Kremenek 5bd04952d4 [analyzer] teach ExprEngine about loads from static C++ class fields. Fixes <rdar://problem/9948787>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137760 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 21:37:52 +00:00
Ted Kremenek 6c7511db99 [analyzer] add ExprEngine::getEagerlyAssumedTags() to allow externally querying of "eagerly assumed" expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137704 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 01:53:39 +00:00
Ted Kremenek 86b39f20d5 [analyzer] Remove PostStmtCustom ProgramPoint. It can be represented using tagged PostStmts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137697 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 00:49:19 +00:00
Ted Kremenek 18c66fdc3c Rename GRState to ProgramState, and cleanup some code formatting along the way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137665 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-15 22:09:50 +00:00
Ted Kremenek 9c378f7054 Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137537 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 23:37:29 +00:00
Ted Kremenek ca804539d9 [analyzer] change "tag" in ProgramPoint from "void*" to a ProgramPointTag*.
Having a notion of an actual ProgramPointTag will aid in introspection of the analyzer's behavior.
For example, the GraphViz output of the analyzer will pretty-print the tags in a useful manner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137529 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 23:04:46 +00:00
Ted Kremenek 9697934650 [analyzer] Introduce new MemRegion, "TypedValueRegion", so that we can separate TypedRegions that implement getValueType() from those that don't.
Patch by Olaf Krzikalla!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137498 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 20:02:48 +00:00
Anna Zaks 0e89061a39 Cleanup: remove CleanedSate member and GetState() wrapper from StmtNodeBuilder, not needed as of r137273.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137284 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-11 00:11:21 +00:00
Anna Zaks db5e8cd095 Cleanup: remove GetState() wrapper from ExprEngine, not needed as of r137273.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137279 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 23:34:53 +00:00
Anna Zaks 6bd528b9d7 Analyzer Core: In checkDeadSymbols checker callback, provide the state in which the symbols are not yet deleted so that checkers could inspect them. Since we are now always creating a transition in ProcessStmt(), remove the logic for adding a transition when none was generated. TODO: the extra transitions will have to be removed; more cleanups; a checker that tests teh new fucntionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137273 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 23:14:54 +00:00
Ted Kremenek f91a5b008d [analyzer] Simplify logic for ExprEngine::VisitUnaryExprOrTypeTraitExpr to avoid recursion to subexpression.
This exposed bugs in the live variables analysis, and a latent analyzer bug in the SymbolReaper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137006 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-06 00:30:00 +00:00
Ted Kremenek ff8e758c30 [analyzer] Drastically simplify ExprEngine::VisitInitListExpr() by assuming all initializer expressions have already been evaluated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136706 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 18:27:05 +00:00
Benjamin Kramer b9a8adf57b Remove dead code flagged by GCC's -Wunused-but-set-variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136581 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-31 01:06:41 +00:00
Ted Kremenek 6075f01f55 [analyzer] Remove recursive visitation in ExprEngine::VisitDeclStmt because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136522 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:41 +00:00
Ted Kremenek 71f20db43b [analyzer] Remove recursive visitation in ExprEngine::VisitCompoundLiteralExpr because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:39 +00:00
Ted Kremenek 4e906e889d [analyzer] Remove recursive visitation in ExprEngine::VisitCastExpr because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136520 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:37 +00:00
Ted Kremenek 70a34da7a7 [analyzer] Remove recursive visitation in ExprEngine::VisitObjCForCollectionStmt because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136519 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:35 +00:00
Ted Kremenek 4410a935e8 [analyzer] Remove explicit argument processing from ExprEngine::VisitObjCMessage() since it is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136518 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:31 +00:00
Ted Kremenek 871f686b47 [analyzer] Remove recursive visitation in ExprEngine::VisitLValObjCIvarRefExpr because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136517 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:28 +00:00
Ted Kremenek 994b8d374a [analyzer] tighten up ExprEngine::VisitObjCAtSynchronizationStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136516 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:26 +00:00
Ted Kremenek ae2dc146c9 [analyzer] Remove recursive visitation in ExprEngine::VisitObjCPropertyRefExpr because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136515 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:24 +00:00
Ted Kremenek 962fddcd97 [analyzer] Remove recursive visitation in ExprEngine::VisitCallExpr because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136514 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:22 +00:00
Ted Kremenek e3939d7446 [analyzer] Remove recursive visitation in ExprEngine::VisitMemberExpr because it isn't needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136513 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:19 +00:00
Ted Kremenek 8f3407ef22 [analyzer] Remove recursive visitation in ExprEngine::VisitLvalArraySubscriptExpr() because it is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136512 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 21:18:17 +00:00
Ted Kremenek 8829989238 [analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs.
The motivation of this large change is to drastically simplify the logic in ExprEngine going forward.

Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will
need to be fixed over time.  There is also some possible performance regression as RemoveDeadBindings
will be called frequently; this can also be improved over time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136419 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:59 +00:00
Ted Kremenek eea72a925f [analyzer] fix handling of MaterializeTemporaryExpr by binding the result value to
the proper expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136412 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 23:07:36 +00:00
Chandler Carruth 642116259e Rename getInstantiationLineNumber to getExpansionLineNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135969 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 21:09:52 +00:00
Chandler Carruth a77c031cb6 Rename getInstantiationColumnNumber to getExpansionColumnNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135965 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 20:57:57 +00:00
Chris Lattner 5f9e272e63 remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 10:55:15 +00:00
Jordy Rose 8f08426e6f [analyzer] GNU __null is a pointer-sized integer, not a pointer. Fixes PR10372.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135294 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 20:29:02 +00:00
John McCall 91a5755ad7 Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135243 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 05:09:51 +00:00
John McCall 7e5e5f4cc3 In ARC, reclaim all return values of retainable type, not just those
where we have an immediate need of a retained value.

As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain.  This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.

rdar://problem/9504800



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-07 06:58:02 +00:00
Douglas Gregor 03e8003051 Introduce a new AST node describing reference binding to temporaries.
MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given

  const int& r = 1.0;

The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value. 

IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-21 17:03:29 +00:00
John McCall f85e193739 Automatic Reference Counting.
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-15 23:02:42 +00:00
Tanya Lattner 61eee0ca33 Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 00:47:47 +00:00
Ted Kremenek e5cfd52a3a static analyzer: when conservatively evaluating functions, don't invalidate the values of globals when the called function is strlen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132100 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 23:57:29 +00:00
Ted Kremenek ce30688b8a Fix regression in static analyzer's handling of prefix '--' operator. It was being treated as postfix '--' in C mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131770 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 23:40:06 +00:00
Douglas Gregor 575a1c9dc8 Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 16:38:50 +00:00
Ted Kremenek 35bdbf4062 Augment retain/release checker to not warn about tracked objects passed as arguments to C++ constructors. This is a stop-gap measure for Objective-C++ code that uses smart pointers to manage reference counts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130711 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-02 19:42:42 +00:00
John Wiegley 28bbe4b8ac Parsing/AST support for Structured Exception Handling
Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 01:08:34 +00:00
John Wiegley 21ff2e516b Implementation of Embarcadero array type traits
Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 00:16:57 +00:00
John Wiegley 552622067d t/clang/expr-traits
Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-25 06:54:41 +00:00
Ted Kremenek e970c60dad Add static analyzer support for C++'0X nullptr. Patch by Jim Goodnow II.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130003 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-22 18:01:30 +00:00
Peter Collingbourne f111d93572 C1X: implement generic selections
As an extension, generic selection support has been added for all
supported languages.  The syntax is the same as for C1X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 00:35:48 +00:00
Richard Smith ad762fcdc1 Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-14 22:09:26 +00:00
John McCall 755d8497e3 After some discussion with Doug, we decided that it made a lot more sense
for __unknown_anytype resolution to destructively modify the AST.  So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-12 00:42:48 +00:00
John McCall 379b5155b4 More __unknown_anytype work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-11 07:02:50 +00:00
Anders Carlsson 575b374fdb Remove CK_DynamicToNull.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-11 02:03:26 +00:00
Anders Carlsson 7d99bc37e7 As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
represents a dynamic cast where we know that the result is always null.

For example:

struct A {
  virtual ~A();
};
struct B final : A { };
struct C { };

bool f(B* b) {
  return dynamic_cast<C*>(b);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 20:33:22 +00:00
Ted Kremenek 5fe98728dc Start overhauling static analyzer support for C++ constructors. The inlining support isn't complete, and needs
to be reworked to model CallEnter/CallExit (just like all other calls).  For now, treat constructors mostly
like other function calls, making the analysis of C++ code just a little more useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129166 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-08 22:42:35 +00:00
John McCall 1de4d4e8cb Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use.  I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-07 08:22:57 +00:00
Ted Kremenek d40066b0fb Fix PR 9626 (duplicated self-init warnings under -Wuninitialized) with numerous CFG and UninitializedValues analysis changes:
1) Change the CFG to include the DeclStmt for conditional variables, instead of using the condition itself as a faux DeclStmt.
2) Update ExprEngine (the static analyzer) to understand (1), so not to regress.
3) Update UninitializedValues.cpp to initialize all tracked variables to Uninitialized at the start of the function/method.
4) Only use the SelfReferenceChecker (SemaDecl.cpp) on global variables, leaving the dataflow analysis to handle other cases.

The combination of (1) and (3) allows the dataflow-based -Wuninitialized to find self-init problems when the initializer
contained control-flow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128858 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04 23:29:12 +00:00
Ted Kremenek 422ab7a49a Teach IdempotentOperationsChecker about paths aborted because ExprEngine didn't know how to handle a specific Expr type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128761 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02 02:56:23 +00:00
Ted Kremenek 94ae8fd470 Static analyzer: fix bug in handling of dynamic_cast<>. The sink node wouldn't always be the final node, thus causing the state to continue propagating. Instead,
recover some path-sensitivity by conjuring a symbol.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128612 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31 04:46:53 +00:00
Ted Kremenek b277159055 Begin reworking static analyzer support for C++ method calls. The current logic was divorced
from how we process ordinary function calls, had a tremendous about of redundancy, and relied
strictly on inlining behavior (which was incomplete) to provide semantics instead of falling
back to the conservative analysis we use for C functions.  This is a significant step into
making C++ analyzer support more useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128557 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 17:41:19 +00:00
Ted Kremenek 46fc3fae1c static analyzer: Handle 'ExprWithCleanups' in ExprEngine by essentially ignoring them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127523 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 02:49:09 +00:00
Peter Collingbourne f4e3cfbe8a Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof.  Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-11 19:24:49 +00:00
Ted Kremenek e71f3d5878 Teach CFGBuilder to prune trivially unreachable case statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126797 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 23:12:55 +00:00
Ted Kremenek 3c0349e87c In preparation for fixing PR 6884, rework CFGElement to have getAs<> return pointers instead of fresh CFGElements.
- Also, consoldiate getDtorKind() and getKind() into one "kind".
- Add empty getDestructorDecl() method to CFGImplicitDtor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126738 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 03:15:10 +00:00
Argyrios Kyrtzidis 7636d8853f [analyzer] Move lib/StaticAnalyzer/Checkers/ExprEngine.cpp -> lib/StaticAnalyzer/Core
and hope the wrath of the buildbots will not descend upon me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126728 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 01:24:23 +00:00