Tom Care
796ed50433
Reapply 112850 and 112839 with a constructor for the BinaryOperatorData struct. Clang would zero out the enum and pointer in the struct in some conditions, but GCC would never zero out the values.
...
llvm-svn: 112909
2010-09-02 23:30:22 +00:00
Douglas Gregor
040ad500c4
Fix a few more ConvertTypes that should be ConvertTypeForMems, fixing
...
two regressions in Boost.Config.
llvm-svn: 112908
2010-09-02 23:24:14 +00:00
Sebastian Redl
b469afb4f3
Implement __has_virtual_destructor. Patch by Steven Watanabe.
...
llvm-svn: 112905
2010-09-02 23:19:42 +00:00
Chris Lattner
369721a16e
stop looking for #uses comments.
...
llvm-svn: 112898
2010-09-02 22:48:26 +00:00
Chris Lattner
60c160ff4d
remove some tests that aren't adding any value: the check lines don't
...
make it clear what they're testing so there is no way to know it's right
or to update it.
llvm-svn: 112897
2010-09-02 22:43:55 +00:00
Bill Wendling
447fa62226
Add a couple of FIXMEs. The types of palignr are different here than in GCC.
...
llvm-svn: 112891
2010-09-02 22:38:10 +00:00
Bob Wilson
5b4904f7a3
Add a bunch of missing bitcasts for clang NEON builtin expansions.
...
Radar 8388233
llvm-svn: 112890
2010-09-02 22:37:30 +00:00
Douglas Gregor
f24eaee2b3
Teach libclang to visit OverloadExprs, so that we can reuse this
...
code. Also, teach it about explicitly-specified template arguments.
llvm-svn: 112884
2010-09-02 22:29:21 +00:00
John McCall
310083c3e3
sabre points out that the timing here is pretty pessimal; I'll retry the
...
experiment in a few days.
llvm-svn: 112882
2010-09-02 22:27:38 +00:00
Douglas Gregor
3ca46b4275
Add libclang visitation for UnresolvedLookupExprs
...
llvm-svn: 112879
2010-09-02 22:19:24 +00:00
John McCall
25f7aa8158
Experimentally move the tautological comparison warnings from -Wsign-compare
...
to -Wtautological-compare. This implies that they're now on by default.
If this causes chaos, I'll figure something else out.
llvm-svn: 112877
2010-09-02 22:18:59 +00:00
Douglas Gregor
4edb2ff89f
Add libclang visitation for C++ pseudo-destructor expressions.
...
llvm-svn: 112873
2010-09-02 22:09:03 +00:00
Bill Wendling
eeb53e60bc
Reorder the MMX builtins to be in their own ostracized group.
...
llvm-svn: 112872
2010-09-02 22:07:51 +00:00
Bill Wendling
e6fd79bc1c
Newline at end of file.
...
llvm-svn: 112871
2010-09-02 22:07:07 +00:00
Douglas Gregor
6429f5cf29
Eliminate CXXBindReferenceExpr, which was used in a ton of
...
well-intentioned but completely unused code.
llvm-svn: 112868
2010-09-02 21:50:02 +00:00
Douglas Gregor
fd81cea70c
Teach libclang not to recursive into default argument expressions
...
llvm-svn: 112866
2010-09-02 21:38:13 +00:00
Daniel Dunbar
5dc823f7ef
Add a compatibility note about why Clang rejects jumps past __block variables.
...
llvm-svn: 112865
2010-09-02 21:35:16 +00:00
Douglas Gregor
46af501065
Add libclang visitation for C++ typeid expressions.
...
llvm-svn: 112862
2010-09-02 21:20:16 +00:00
Douglas Gregor
32e4c861c8
In libclang, visit the nested-name-specifier and explicitly-specified template arguments of a MemberExpr.
...
llvm-svn: 112860
2010-09-02 21:07:44 +00:00
Tom Care
9fbfeea05b
Reverting 112850 and 112839 due to test failures on some systems
...
llvm-svn: 112857
2010-09-02 20:58:38 +00:00
Douglas Gregor
aac7c8106a
Visit the nested-name-specifier and explicitly-specified template
...
arguments of a DeclRefExpr.
llvm-svn: 112854
2010-09-02 20:35:02 +00:00
Tom Care
a25b273a5b
Fixed broken build with GCC
...
llvm-svn: 112850
2010-09-02 19:00:08 +00:00
John McCall
1ba95136f2
Teach RecursiveASTVisitor to optionally visit bodies of instantiations.
...
Based on a patch by Francois Pichet!
llvm-svn: 112848
2010-09-02 18:48:54 +00:00
David Chisnall
cf60744cd7
Tidy up last commit, as per Devang's comments.
...
llvm-svn: 112840
2010-09-02 18:01:51 +00:00
Tom Care
1ce2faca05
Improved error reporting in IdempotentOperationChecker
...
- SourceRange highlighting is only given for the relevant side of the operator (assignments give both)
- Added PostVisitBinaryOperator hook to retrieve the ExplodedNode for an operator
- Added a BugReporterVisitor to display the last store to every VarDecl in a Stmt
- Changed bug reporting to use the new BugReporterVisitor
llvm-svn: 112839
2010-09-02 17:49:20 +00:00
Douglas Gregor
04f3621860
Revert my two IRgen fixes for "bool", then use a far simpler approach
...
based on ConvertTypeForMem. Thanks to John for pointing out the right
solution.
llvm-svn: 112838
2010-09-02 17:38:50 +00:00
Douglas Gregor
3335f48448
Implement basic visitation for nested name specifiers via libclang
...
cursors. Sadly, this visitation is a hack, because we don't have
proper source-location information for nested-name-specifiers in the
AST. It does improve on the status quo, however.
llvm-svn: 112837
2010-09-02 17:35:32 +00:00
Fariborz Jahanian
05bbef63b6
Another i1 vs. i8 type mismatch issue. This time
...
a 'bool' byref variable in memory. Fixes radar 8382559.
llvm-svn: 112835
2010-09-02 17:28:31 +00:00
David Chisnall
6bf98ff491
Use the unmangled name for the display name in Objective-C debug info. This should have no effect with the Mac runtime where clang (unlike GCC) uses the display name symbol name.
...
llvm-svn: 112833
2010-09-02 17:16:32 +00:00
Douglas Gregor
262e4e2ab5
Fix more i1/i8 pointer madness. Here, an overactive assertion
...
complains when the element type of a C++ "delete" expression is
different from what we would expect from the pointer type. When
deleting a bool*, we end up with an i1 on one side (where we compute
the LLVM type from the Clang bool type) and i8 on the other (where we
grab the LLVM type from the LLVM pointer type). I've weakened the
assertion appropriately, and the Boost Parallel Graph Library now
passes its regression tests.
llvm-svn: 112821
2010-09-02 15:34:35 +00:00
Benjamin Kramer
cd495039cc
Avoid implicit string construction.
...
llvm-svn: 112820
2010-09-02 15:06:24 +00:00
Douglas Gregor
e791a0546c
Fix a crash involving pointer-to-data-members of boolean type. We were
...
constructing an LLVM PointerType directly from the "bool"'s LLVM type
(i1), which resulted in unfortunate pointer type i1*. The fix is to
build the LLVM PointerType from the corresponding Clang PointerType,
so that we get i8* in the case of a bool.
John, please review. I also left a FIXME there because we seem to be
dropping "volatile", which would be rather unfortunate.
llvm-svn: 112819
2010-09-02 15:00:29 +00:00
John McCall
9bca923c10
Simplify some random accesses to the ASTContext from the ABI classes.
...
llvm-svn: 112816
2010-09-02 10:25:57 +00:00
John McCall
db8af38670
Stupid emacs keystroke.
...
llvm-svn: 112815
2010-09-02 10:15:05 +00:00
John McCall
8ed55a54fd
Abstract IR generation of array cookies into the C++ ABI class and
...
implement ARM array cookies. Also fix a few unfortunate bugs:
- throwing dtors in deletes prevented the allocation from being deleted
- adding the cookie to the new[] size was not being considered for
overflow (and, more seriously, was screwing up the earlier checks)
- deleting an array via a pointer to array of class type was not
causing any destructors to be run and was passing the unadjusted
pointer to the deallocator
- lots of address-space problems, in case anyone wants to support
free store in a variant address space :)
llvm-svn: 112814
2010-09-02 09:58:18 +00:00
Duncan Sands
7f1982731e
Correct this test for the fact that the number of uses is now printed
...
in a comment.
llvm-svn: 112813
2010-09-02 08:52:56 +00:00
Dawn Perchik
f0882f90f3
Reverting rev 112791 - apparently -fborland-extensions is on all the time?!
...
llvm-svn: 112797
2010-09-02 02:18:55 +00:00
Zhongxing Xu
dcf7b3501d
update comments.
...
llvm-svn: 112796
2010-09-02 01:56:39 +00:00
Zhongxing Xu
ef94284f2f
Tweak test case. 'int' would introduce out-of-bound issues. We focus on array
...
index constraints in this case.
llvm-svn: 112794
2010-09-02 01:42:44 +00:00
Ted Kremenek
cbe6b0b846
Enhance return-stack-address check (in Sema) to handle fields that themselves are references. (Fixes PR 7999; fix by Chandler Carruth).
...
llvm-svn: 112792
2010-09-02 01:12:13 +00:00
Dawn Perchik
1fcc18c7bc
Add support for Borland extensions via option -fborland-extensions
...
llvm-svn: 112791
2010-09-02 01:12:01 +00:00
Ted Kremenek
07343c02be
For GRExprEngine::EvalBind() (and called visitors), unifiy StoreE and AssignE. Now StoreE (const Stmt*) represents the expression where the store took place, which is the assignment expression if it takes place in an assignment. This removes some conceptual dissidence as well as removes an extra parameter from the Checker::PreVisitBind() visitor. It also improves ranges and source location information in analyzer diagnostics.
...
llvm-svn: 112789
2010-09-02 00:56:20 +00:00
Zhanyong Wan
e65eb99bd2
Fixes a warning when compiling Clang (Sema has virtual methods but a non-virtual dtor). Reviewed by chandlerc and nlewycky.
...
llvm-svn: 112786
2010-09-02 00:43:20 +00:00
Ted Kremenek
1e424241b4
Fixed unused variable warning.
...
llvm-svn: 112784
2010-09-02 00:34:30 +00:00
Douglas Gregor
d3f48bd3be
Introduce a new libclang function,
...
clang_getSpecializedCursorTemplate(), which determines the template
(or member thereof) that the given cursor specializes or from which it
was instantiated. This routine can be used to establish a link between
templates and their instantiations/specializations.
llvm-svn: 112780
2010-09-02 00:07:54 +00:00
Zhanyong Wan
abb6d6d618
Make RecursiveASTVisitor not crash when a TemplateArgumentLoc object has a NULL TypeSourceInfo*. This fixes the symptom of http://llvm.org/PR8043 . Reviewed by csilvers.
...
llvm-svn: 112777
2010-09-01 23:54:22 +00:00
Bill Wendling
da08c3824b
Add some MMX builtins to correspond with the intrinsics now accepted by
...
LLVM. This will be used by the mmintrin.h header, but that bit still needs to be
worked out.
llvm-svn: 112776
2010-09-01 23:54:16 +00:00
Ted Kremenek
f3a734d8ee
Add yet another test case for PR 8015, showing how reasoning over symbolic indices should exactly resolve over multiple index possibilities (and thus suppress the false positive in the test).
...
llvm-svn: 112770
2010-09-01 23:37:38 +00:00
Ted Kremenek
121ddd6a5c
Add another test case for PR 8015, here with the array index being within a valid range and not just a single constant.
...
llvm-svn: 112769
2010-09-01 23:37:36 +00:00
Ted Kremenek
0e12f9cc7b
Partial fix for PR 8015 (fix is actually by Jordy Rose, and I added a test case for follow-on work). This patch adds a bandaid for RegionStore's limited reasoning about symbolic array values.
...
llvm-svn: 112766
2010-09-01 23:27:26 +00:00