Nuno Lopes [Fri, 3 Sep 2010 18:01:10 +0000 (18:01 +0000)]
update svn:ignore
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112980
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 3 Sep 2010 18:01:09 +0000 (18:01 +0000)]
Use std::string instead of llvm::StringRef to avoid dangling ref.
Per Chris's comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112979
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 3 Sep 2010 17:35:34 +0000 (17:35 +0000)]
libclang visitation for CXXDependentScopeMemberExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112978
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 3 Sep 2010 17:33:04 +0000 (17:33 +0000)]
Use getSpelling to get original text of the
c++ operator token. (radar
8328250).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112977
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 3 Sep 2010 17:24:10 +0000 (17:24 +0000)]
libclang visitation for DependentScopeDeclRefExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112975
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 3 Sep 2010 17:16:03 +0000 (17:16 +0000)]
Add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112974
91177308-0d34-0410-b5e6-
96231b3b80d8
Dawn Perchik [Fri, 3 Sep 2010 17:01:13 +0000 (17:01 +0000)]
Put the info on testing from the command line into its own section
titled "Testing on the Command Line".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Sep 2010 16:47:03 +0000 (16:47 +0000)]
fix a hard coded version number, PR8031. Patch by 'nobled'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112970
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Sep 2010 16:45:53 +0000 (16:45 +0000)]
fix lookup of bits/c++config.h on mingw, patch by Ismail Donmez!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112969
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 3 Sep 2010 16:23:44 +0000 (16:23 +0000)]
Simplify code-completion result sorting a bit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112968
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 3 Sep 2010 15:59:27 +0000 (15:59 +0000)]
Remove end-of-line translation properties from test, in the hopes of fixing this test on Windows
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112966
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 3 Sep 2010 15:45:00 +0000 (15:45 +0000)]
Avoid unnecessary redirect, so that stderr shows up in output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112965
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Fri, 3 Sep 2010 08:42:01 +0000 (08:42 +0000)]
First test commit by Francois Pichet. _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES is not a predefined macro, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112953
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 3 Sep 2010 05:07:55 +0000 (05:07 +0000)]
Update the internals manual for the removal of Action, as well as other
changes that are much older.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112951
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 3 Sep 2010 04:56:05 +0000 (04:56 +0000)]
Add a quick-and-dirty hack to give a better diagnostic for [class.protected]
restrictions. The note's not really on the right place given its wording,
but putting a second note on the call site (or muddying the wording) doesn't
appeal.
There are corner cases where this can be wrong, but I'm not concerned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112950
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Sep 2010 04:34:38 +0000 (04:34 +0000)]
"I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out
in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out
in case it's useful
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112949
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 3 Sep 2010 02:10:08 +0000 (02:10 +0000)]
Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 3 Sep 2010 02:07:00 +0000 (02:07 +0000)]
IRgen: Fix silly thinko in r112021, which was generating code for the same expr
twice. This showed up as an assert on the odd test case because we generated the
decl map entry twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112943
91177308-0d34-0410-b5e6-
96231b3b80d8
Dawn Perchik [Fri, 3 Sep 2010 01:29:35 +0000 (01:29 +0000)]
Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 3 Sep 2010 01:27:09 +0000 (01:27 +0000)]
Translate NEON vabdl, vaba, and vabal builtins to be implemented using the
vabd intrinsic combined with zext and add operations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112937
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 3 Sep 2010 01:26:39 +0000 (01:26 +0000)]
Re-commit r112916 with an additional fix for the self-host failures.
I've audited the remaining getFunctionInfo call sites.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112936
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 3 Sep 2010 01:26:16 +0000 (01:26 +0000)]
Patch to allow alternative representation of c++
operators (and, or, etc.) to be used as selectors
to match g++'s behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112935
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 3 Sep 2010 01:11:38 +0000 (01:11 +0000)]
Static local variables don't result in global constructors being emitted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112933
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 3 Sep 2010 01:07:06 +0000 (01:07 +0000)]
Support pointer arithmetic in SimpleSValuator involving direct constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112932
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 3 Sep 2010 01:07:04 +0000 (01:07 +0000)]
Remove bogus assertions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112931
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 3 Sep 2010 01:07:02 +0000 (01:07 +0000)]
Add optional record of "location" SVals in the environment. When we analyzing loads/stores, we lose the location SVal, which makes it difficult to recover in some cases (e.g., for post diagnostics). This is prep for pending changes to GRExprEngine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112930
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 3 Sep 2010 01:06:58 +0000 (01:06 +0000)]
Add GRState::getSimplifiedSVal(), which provides an API hook for doing symbol -> constant folding. This isn't used yet, but
is prep for some pending optimizations in GRExprEngine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112929
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 3 Sep 2010 01:06:44 +0000 (01:06 +0000)]
Fix enum: CallEnter/CallExit are StmtPoints
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112928
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 3 Sep 2010 00:51:09 +0000 (00:51 +0000)]
Remove now unused function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112927
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 3 Sep 2010 00:41:43 +0000 (00:41 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112926
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 3 Sep 2010 00:40:45 +0000 (00:40 +0000)]
Revert r112916, it's breaking selfhost pretty badly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112925
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 3 Sep 2010 00:35:23 +0000 (00:35 +0000)]
Revert "Another i1 vs. i8 type mismatch issue. This time", it breaks some projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112922
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 3 Sep 2010 00:25:02 +0000 (00:25 +0000)]
Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning.
The rationale behind this is that it is normal for callback functions to have a non-void return type
and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 3 Sep 2010 00:24:06 +0000 (00:24 +0000)]
tests: Fix a dependency on the temporary value names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112917
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 3 Sep 2010 00:01:57 +0000 (00:01 +0000)]
It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfo
to set up a destructor call, because ABIs can tweak these conventions.
Fixes rdar://problem/
8386802.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112916
91177308-0d34-0410-b5e6-
96231b3b80d8
Dawn Perchik [Thu, 2 Sep 2010 23:59:25 +0000 (23:59 +0000)]
Add support for Borland extensions via option -fborland-extensions
(original patch r112791 was reverted due to a bug).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112915
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 2 Sep 2010 23:53:31 +0000 (23:53 +0000)]
IRgen/Obj-C: Rewrite Objective-C bit-field access to compute the access strategy
using the same methods as used for normal structures.
- This fixes problems with reading past the end of the structure and with
handling straddled bit-field access.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112914
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 2 Sep 2010 23:53:28 +0000 (23:53 +0000)]
IRgen: Move CGBitFieldInfo strategy computation helpers to static member
functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112913
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Care [Thu, 2 Sep 2010 23:30:22 +0000 (23:30 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112909
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 23:24:14 +0000 (23:24 +0000)]
Fix a few more ConvertTypes that should be ConvertTypeForMems, fixing
two regressions in Boost.Config.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112908
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 2 Sep 2010 23:19:42 +0000 (23:19 +0000)]
Implement __has_virtual_destructor. Patch by Steven Watanabe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112905
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Sep 2010 22:48:26 +0000 (22:48 +0000)]
stop looking for #uses comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112898
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Sep 2010 22:43:55 +0000 (22:43 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112897
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 2 Sep 2010 22:38:10 +0000 (22:38 +0000)]
Add a couple of FIXMEs. The types of palignr are different here than in GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112891
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 2 Sep 2010 22:37:30 +0000 (22:37 +0000)]
Add a bunch of missing bitcasts for clang NEON builtin expansions.
Radar
8388233
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112890
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 22:29:21 +0000 (22:29 +0000)]
Teach libclang to visit OverloadExprs, so that we can reuse this
code. Also, teach it about explicitly-specified template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112884
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 2 Sep 2010 22:27:38 +0000 (22:27 +0000)]
sabre points out that the timing here is pretty pessimal; I'll retry the
experiment in a few days.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112882
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 22:19:24 +0000 (22:19 +0000)]
Add libclang visitation for UnresolvedLookupExprs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112879
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 2 Sep 2010 22:18:59 +0000 (22:18 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112877
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 22:09:03 +0000 (22:09 +0000)]
Add libclang visitation for C++ pseudo-destructor expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112873
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 2 Sep 2010 22:07:51 +0000 (22:07 +0000)]
Reorder the MMX builtins to be in their own ostracized group.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112872
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 2 Sep 2010 22:07:07 +0000 (22:07 +0000)]
Newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112871
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 21:50:02 +0000 (21:50 +0000)]
Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 21:38:13 +0000 (21:38 +0000)]
Teach libclang not to recursive into default argument expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112866
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 2 Sep 2010 21:35:16 +0000 (21:35 +0000)]
Add a compatibility note about why Clang rejects jumps past __block variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112865
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 21:20:16 +0000 (21:20 +0000)]
Add libclang visitation for C++ typeid expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112862
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 21:07:44 +0000 (21:07 +0000)]
In libclang, visit the nested-name-specifier and explicitly-specified template arguments of a MemberExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112860
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Care [Thu, 2 Sep 2010 20:58:38 +0000 (20:58 +0000)]
Reverting 112850 and 112839 due to test failures on some systems
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112857
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 20:35:02 +0000 (20:35 +0000)]
Visit the nested-name-specifier and explicitly-specified template
arguments of a DeclRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112854
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Care [Thu, 2 Sep 2010 19:00:08 +0000 (19:00 +0000)]
Fixed broken build with GCC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112850
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 2 Sep 2010 18:48:54 +0000 (18:48 +0000)]
Teach RecursiveASTVisitor to optionally visit bodies of instantiations.
Based on a patch by Francois Pichet!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112848
91177308-0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Thu, 2 Sep 2010 18:01:51 +0000 (18:01 +0000)]
Tidy up last commit, as per Devang's comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112840
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Care [Thu, 2 Sep 2010 17:49:20 +0000 (17:49 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112839
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 17:38:50 +0000 (17:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112838
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 17:35:32 +0000 (17:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112837
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 2 Sep 2010 17:28:31 +0000 (17:28 +0000)]
Another i1 vs. i8 type mismatch issue. This time
a 'bool' byref variable in memory. Fixes radar
8382559.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112835
91177308-0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Thu, 2 Sep 2010 17:16:32 +0000 (17:16 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112833
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 15:34:35 +0000 (15:34 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112821
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 2 Sep 2010 15:06:24 +0000 (15:06 +0000)]
Avoid implicit string construction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112820
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 15:00:29 +0000 (15:00 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112819
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 2 Sep 2010 10:25:57 +0000 (10:25 +0000)]
Simplify some random accesses to the ASTContext from the ABI classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112816
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 2 Sep 2010 10:15:05 +0000 (10:15 +0000)]
Stupid emacs keystroke.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112815
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 2 Sep 2010 09:58:18 +0000 (09:58 +0000)]
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 :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112814
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 2 Sep 2010 08:52:56 +0000 (08:52 +0000)]
Correct this test for the fact that the number of uses is now printed
in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112813
91177308-0d34-0410-b5e6-
96231b3b80d8
Dawn Perchik [Thu, 2 Sep 2010 02:18:55 +0000 (02:18 +0000)]
Reverting rev 112791 - apparently -fborland-extensions is on all the time?!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112797
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 2 Sep 2010 01:56:39 +0000 (01:56 +0000)]
update comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112796
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 2 Sep 2010 01:42:44 +0000 (01:42 +0000)]
Tweak test case. 'int' would introduce out-of-bound issues. We focus on array
index constraints in this case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112794
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 2 Sep 2010 01:12:13 +0000 (01:12 +0000)]
Enhance return-stack-address check (in Sema) to handle fields that themselves are references. (Fixes PR 7999; fix by Chandler Carruth).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112792
91177308-0d34-0410-b5e6-
96231b3b80d8
Dawn Perchik [Thu, 2 Sep 2010 01:12:01 +0000 (01:12 +0000)]
Add support for Borland extensions via option -fborland-extensions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112791
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 2 Sep 2010 00:56:20 +0000 (00:56 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112789
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Thu, 2 Sep 2010 00:43:20 +0000 (00:43 +0000)]
Fixes a warning when compiling Clang (Sema has virtual methods but a non-virtual dtor). Reviewed by chandlerc and nlewycky.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112786
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 2 Sep 2010 00:34:30 +0000 (00:34 +0000)]
Fixed unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112784
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 2 Sep 2010 00:07:54 +0000 (00:07 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112780
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Wed, 1 Sep 2010 23:54:22 +0000 (23:54 +0000)]
Make RecursiveASTVisitor not crash when a TemplateArgumentLoc object has a NULL TypeSourceInfo*. This fixes the symptom of http://llvm.org/PR8043. Reviewed by csilvers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112777
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 1 Sep 2010 23:54:16 +0000 (23:54 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112776
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Sep 2010 23:37:38 +0000 (23:37 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112770
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Sep 2010 23:37:36 +0000 (23:37 +0000)]
Add another test case for PR 8015, here with the array index being within a valid range and not just a single constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112769
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Sep 2010 23:27:26 +0000 (23:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112766
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 1 Sep 2010 23:20:27 +0000 (23:20 +0000)]
Translate NEON vmull, vmlal, and vmlsl builtins to llvm multiply-add/sub
with zext/sext operations, instead of to llvm intrinsics. I have a plan to
avoid the clang builtins for these, but it is going to take a little longer
and I want to get the NEON intrinsics updated before the 2.8 release.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112764
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Silverstein [Wed, 1 Sep 2010 23:07:49 +0000 (23:07 +0000)]
Update the docstring to say FriendTemplateDecl is not actually used.
Based on discussion with rjmccall and dgregor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112762
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Sep 2010 23:00:46 +0000 (23:00 +0000)]
Don't assert in the analyzer when analyze code does a byte load from a function's address. Fixes PR 8052.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112761
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Silverstein [Wed, 1 Sep 2010 22:55:38 +0000 (22:55 +0000)]
Make some docstring clarifications, after discussion with dgregor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112759
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Sep 2010 20:41:53 +0000 (20:41 +0000)]
Fix the source-range information for an EnumConstantDecl; previously,
it did not include the initializer expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112739
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Sep 2010 20:35:38 +0000 (20:35 +0000)]
Don't assert in CastSizeChecker when the casted-to pointee is an incomplete type. Fixes PR 8050.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112738
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Sep 2010 20:21:58 +0000 (20:21 +0000)]
Test visiting the template parameters of template template parameters,
support for which came in with the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112735
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Sep 2010 20:16:53 +0000 (20:16 +0000)]
Teach libclang to visit the default arguments of template parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112734
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Sep 2010 19:52:22 +0000 (19:52 +0000)]
Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations:
UsingDecl, UnresolvedUsingValueDecl, and
UnresolvedUsingTypenameDecl. These three are collapsed into a single
cursor kind for using declarations, since libclang clients don't need
the distinction.
Several related changes here:
- Cursor visitation of the three AST nodes for using declarations
- Proper source-range computation for these AST nodes
- Using declarations have no USRs, since they don't actually declare
any entities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112730
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 1 Sep 2010 19:36:41 +0000 (19:36 +0000)]
Fix IRGen when property-dot syntax used to access
a c++ class object 'ivar'. Fixes radar
8366604.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112729
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Sep 2010 17:32:36 +0000 (17:32 +0000)]
Improve libclang indexing support for class template specializations
in a few related ways:
- Don't recurse into instantiations of templates.
- Recurse into explicit specializations.
- Visit the template arguments of an explicit specialization or
explicit instantiation.
- Include template specialization arguments in the USRs for class
template specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112720
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 1 Sep 2010 17:28:48 +0000 (17:28 +0000)]
StringRefize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112718
91177308-0d34-0410-b5e6-
96231b3b80d8