Steve Naroff
80a766bf50
Start issuing callback for references (add some predicates, refactor some code).
...
llvm-svn: 80810
2009-09-02 18:26:48 +00:00
Steve Naroff
3645f5a99b
Flesh out CXCursorKind...
...
- More declaration types (distinguish between struct/union/class, instance/class methods).
- Add definition types (class, category, function, instance/class method, etc.).
Add client data to clang_loadDeclaration() and implement.
llvm-svn: 80787
2009-09-02 13:28:54 +00:00
Zhongxing Xu
6e4232c79c
Refactor the check for bad divide into a checker.
...
Also fix a checker context bug: the Dst set is not always empty initially.
Because in GRExprEngine::CheckerVisit(), *CurrSet is used repeatedly.
So we removed the Dst.empty() condition in ~CheckerContext() when deciding
whether to do autotransision.
llvm-svn: 80786
2009-09-02 13:26:26 +00:00
Ted Kremenek
cf768cd202
Replace uses of ImmutableSet in SymbolReaper with DenseSet. This was
...
motivated from Shark profiles that shows that 'markLive' was very
heavy when using --analyzer-store=region. On my benchmark file, this
reduces the analysis time for --analyzer-store=region from 19.5s to
13.5s and for --analyzer-store=basic from 5.3s to 3.5s. For the
benchmark file, this is a reduction of about 30% analysis time for
both analysis modes (a huge win).
llvm-svn: 80765
2009-09-02 06:03:18 +00:00
Fariborz Jahanian
086ac11606
It is illegal to derefrercne to an interface in
...
objc's non-fragile ABI.
llvm-svn: 80739
2009-09-02 00:00:05 +00:00
Douglas Gregor
a3a3f6fecd
In CXXBaseOrMemberInitializer, don't confuse CtorTocall with
...
AnonUnionMember. Fixes PR4826.
llvm-svn: 80721
2009-09-01 21:04:42 +00:00
Anders Carlsson
6904f644e7
Add a CK_FunctionToPointerDecay cast kind.
...
llvm-svn: 80719
2009-09-01 20:37:18 +00:00
Douglas Gregor
d51896311d
Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons
...
llvm-svn: 80690
2009-09-01 17:22:34 +00:00
Steve Naroff
95908b373a
Tweak comment based on Daniel's recently added '-emit-ast' option.
...
llvm-svn: 80684
2009-09-01 17:13:31 +00:00
Douglas Gregor
8bce25f2fe
"The attached patch moves AttributeList::addAttributeList outside the
...
class so as to accomodate one or both parameters being NULL, " from Sean Hunt!
llvm-svn: 80683
2009-09-01 17:10:19 +00:00
Daniel Dunbar
6cdf83c192
Add driver support for -emit-ast and AST compilation steps.
...
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'
llvm-svn: 80678
2009-09-01 16:57:46 +00:00
Douglas Gregor
770a532fa1
Tip-toe around strict-aliasing violation. Fixes PR4061.
...
llvm-svn: 80674
2009-09-01 16:13:00 +00:00
Steve Naroff
69b10fd2c5
Add explicit "blind" client data to callback function (since we aren't using blocks).
...
llvm-svn: 80673
2009-09-01 15:55:40 +00:00
Anders Carlsson
5da848427a
Don't assert when instantiating member references to fields in anonymous structs.
...
llvm-svn: 80657
2009-09-01 04:26:58 +00:00
Douglas Gregor
84f14dd674
Preliminary AST representation and semantic analysis for
...
explicitly-specified template argument lists in member reference
expressions, e.g.,
x->f<int>()
llvm-svn: 80646
2009-09-01 00:37:14 +00:00
Douglas Gregor
f405d7e6f1
Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
...
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.
llvm-svn: 80642
2009-08-31 23:41:50 +00:00
John McCall
759e32bdc6
Fix bug 4784 and allow friend declarations to properly extend
...
existing declaration chains.
llvm-svn: 80636
2009-08-31 22:39:49 +00:00
Douglas Gregor
96ee789d33
Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
...
also be adding explicit template arguments as an additional
"adornment". No functionality change.
llvm-svn: 80628
2009-08-31 21:41:48 +00:00
Douglas Gregor
fbc1823451
Add parsing for references to member function templates with explicit
...
template argument lists, e.g., x.f<int>().
Semantic analysis will be a separate commit.
llvm-svn: 80624
2009-08-31 21:16:32 +00:00
Eli Friedman
7e4faaccda
PR4836, part 1: add Sema support for __builtin_isnan and friends; they
...
are apparently used by Solaris libc despite the fact that clang claims
to be compatible with gcc 4.2, which doesn't support them.
llvm-svn: 80610
2009-08-31 20:06:00 +00:00
Douglas Gregor
522fbc4969
Support explicit C++ member operator syntax, from James Porter!
...
llvm-svn: 80608
2009-08-31 19:52:13 +00:00
David Chisnall
5778fce141
Updated GNU runtime non-fragile ABI.
...
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.
llvm-svn: 80591
2009-08-31 16:41:57 +00:00
Steve Naroff
772c1a4574
Implement source/line/column hooks.
...
llvm-svn: 80585
2009-08-31 14:26:51 +00:00
Steve Naroff
1054e60334
More fleshing out the C-based indexing API (under construction).
...
llvm-svn: 80529
2009-08-31 00:59:03 +00:00
Anders Carlsson
0d2a51b61f
Improve missing error messages as suggested by Doug.
...
llvm-svn: 80489
2009-08-30 06:49:43 +00:00
Anders Carlsson
896c230a19
Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.
...
llvm-svn: 80469
2009-08-30 00:54:35 +00:00
Argyrios Kyrtzidis
9d7ab42eb6
Fix TypeLoc::operator bool().
...
llvm-svn: 80447
2009-08-29 22:39:19 +00:00
Anders Carlsson
7b194b780d
Set the access specifier for using decls.
...
llvm-svn: 80435
2009-08-29 19:54:19 +00:00
Anders Carlsson
4bb87ce33e
Improve instantiation of UnresolvedUsingDecls.
...
llvm-svn: 80434
2009-08-29 19:37:28 +00:00
Eli Friedman
9ab0319b2b
Get rid of mostly-unused, buggy method.
...
llvm-svn: 80432
2009-08-29 19:09:59 +00:00
John McCall
5966088621
Fix the breakage by handling indirect instantiations. This would be much
...
improved if there were a consistent name for getInstantiatedFromMemberX()
across all classes. Cheap refactor if someone wants to do it, but let's get the
buildbots happy first.
llvm-svn: 80425
2009-08-29 08:11:13 +00:00
Anders Carlsson
1e172e068f
Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen!
...
llvm-svn: 80416
2009-08-29 01:31:33 +00:00
Fariborz Jahanian
2fee79a9a1
path to ir-gen 12.3.1 Conversion by constructor
...
llvm-svn: 80398
2009-08-28 22:04:50 +00:00
Anders Carlsson
d20e795a5b
Fix this for real.
...
llvm-svn: 80377
2009-08-28 16:57:08 +00:00
Steve Naroff
a1c728438c
Lot's of little changes to get the C-based indexing API going...
...
Work in progress.
llvm-svn: 80367
2009-08-28 15:28:48 +00:00
Anders Carlsson
4bd7875b9c
Instantiate unresolved using declarations.
...
llvm-svn: 80366
2009-08-28 15:18:15 +00:00
Steve Naroff
8721959642
Add CX prefix to Cursor and move a comment.
...
llvm-svn: 80359
2009-08-28 12:07:44 +00:00
John McCall
aa74a0c3b5
Omnibus friend decl refactoring. Instead of cloning AST classes for friend
...
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.
Refactor the Sema methods specific to friends for cleaner flow and less nesting.
Incidentally solve a few bugs, but I remain confident that we can put them back.
llvm-svn: 80353
2009-08-28 07:59:38 +00:00
Anders Carlsson
f038fc2c12
Create UnresolvedUsingDecls.
...
llvm-svn: 80346
2009-08-28 05:49:21 +00:00
Anders Carlsson
8305c1fa97
Check in UnresolvedUsingDecl.
...
llvm-svn: 80336
2009-08-28 05:30:28 +00:00
Ted Kremenek
198a8c5f95
Use SymbolicRegion instead of CodeTextRegion for symbolic function
...
pointers. Most logic cares first about whether or not a region is
symbolic, and second if represents code. This should fix a series of
silent corner case bugs (as well as simplify a bunch of code).
llvm-svn: 80335
2009-08-28 04:49:15 +00:00
Anders Carlsson
5a9c5acf0f
More work on using declarations.
...
llvm-svn: 80333
2009-08-28 03:35:18 +00:00
Anders Carlsson
59140b3b86
Many improvements to using declarations.
...
llvm-svn: 80332
2009-08-28 03:16:11 +00:00
Chris Lattner
cd50d379ee
Accept and ignore a few more -Wflags.
...
llvm-svn: 80323
2009-08-28 00:35:39 +00:00
Douglas Gregor
6a1f965853
When looking for overloaded member operators, make sure to instantiate
...
class template specializations (when possible) and look into base
classes. Thanks to Eli for the test case!
FIXME -=1.
llvm-svn: 80302
2009-08-27 23:35:55 +00:00
Ted Kremenek
1d5f2f3546
Rename 'bindExpr' to 'BindExpr'.
...
llvm-svn: 80294
2009-08-27 22:17:37 +00:00
Ted Kremenek
0ac724be55
Move the AnalysisContext* from GRState to Environment.
...
llvm-svn: 80293
2009-08-27 22:15:20 +00:00
Eli Friedman
8a46219c57
Add __builtin_memchr (used by GNU libstdc++).
...
llvm-svn: 80288
2009-08-27 22:00:18 +00:00
Steve Naroff
d5e8e862bb
Fill in Index.h header file and add stubs to implementation file.
...
llvm-svn: 80279
2009-08-27 19:51:58 +00:00
Eli Friedman
f871945c39
PR4800: Implement -Wpointer-arith. I think this is the correct behavior
...
per the documentation, although I'm not completely sure.
llvm-svn: 80257
2009-08-27 17:20:36 +00:00