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
Douglas Gregor
e704c9df31
Implement instantiation of the declarations of member function
...
templates within class templates, producing a member function template
of a class template specialization. If you can parse that, I'm
sorry. Example:
template<typename T>
struct X {
template<typename U> void f(T, U);
};
When we instantiate X<int>, we now instantiate the declaration
X<int>::f, which looks like this:
template<typename U> void X<int>::f(int, U);
The path this takes through
TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and
ugly, but I don't know how to improve it yet. I'm resting my hopes on
the multi-level substitution required to instantiate definitions of
nested templates, which may simplify this code as well.
More testing to come...
llvm-svn: 80252
2009-08-27 16:57:43 +00:00
Zhongxing Xu
16ba5f1cfb
Remove unused utility methods of GRStmtNodeBuilder.
...
llvm-svn: 80237
2009-08-27 09:14:03 +00:00
Zhongxing Xu
dd179f303a
Remove unused utility methods of GRStmtNodeBuilder.
...
llvm-svn: 80236
2009-08-27 08:52:44 +00:00
Gabor Greif
692ed1fc16
restore indentation
...
llvm-svn: 80229
2009-08-27 07:30:55 +00:00
Gabor Greif
9c83bf222d
add missing header
...
llvm-svn: 80228
2009-08-27 07:10:46 +00:00
Zhongxing Xu
3ca89b9f20
Remove a unused member variable. Instead query the option from AnalysisManager.
...
llvm-svn: 80226
2009-08-27 06:55:26 +00:00
Gabor Greif
f7095b0ae9
iterator.h is no more. Be standards compliant.
...
llvm-svn: 80225
2009-08-27 06:49:21 +00:00
Douglas Gregor
e985a3b724
When checking whether one declaration context encloses another, make sure to look at the primary contexts. Thanks to Eli for the test case
...
llvm-svn: 80212
2009-08-27 06:03:53 +00:00
Eli Friedman
561154dd6b
Stub out an error so we don't crash.
...
llvm-svn: 80207
2009-08-27 05:09:36 +00:00
Anders Carlsson
55243168df
In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary.
...
llvm-svn: 80200
2009-08-27 03:53:50 +00:00
Ted Kremenek
907a711f60
Simplify 'Environment' to contain only one map from 'const Stmt*' to SVals, greatly simplifying the logic of the analyzer in many places. We now only distinguish between block-level expressions and subexpressions in Environment::RemoveDeadBindings and GRState pretty-printing.
...
llvm-svn: 80194
2009-08-27 01:39:13 +00:00
Mike Stump
a5f00ef372
Cleanups.
...
llvm-svn: 80185
2009-08-27 00:29:21 +00:00
Anders Carlsson
eabf770457
New RequireNonAbstractType function.
...
llvm-svn: 80183
2009-08-27 00:13:57 +00:00
Douglas Gregor
c190523d7a
When a member reference expression includes a qualifier on the member
...
name, e.g.,
x->Base::f()
retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.
When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?
llvm-svn: 80167
2009-08-26 22:36:53 +00:00
Ted Kremenek
b60d87c517
Add initial boilerplate for CIndex, a shared library that will vend high-level
...
source symbol information (harvested by Clang) through a C API.
llvm-svn: 80166
2009-08-26 22:36:44 +00:00
Anders Carlsson
4fa923c5bc
The PartialDiagnostic constructor doesn't need to be explicit.
...
llvm-svn: 80164
2009-08-26 22:31:44 +00:00
Mike Stump
3722f5896c
Regularize the case and sort.
...
llvm-svn: 80163
2009-08-26 22:31:08 +00:00
Anders Carlsson
024ef42ed8
More improvements to PartialDiagnostic.
...
llvm-svn: 80158
2009-08-26 21:48:37 +00:00
Douglas Gregor
402250f2f9
Implement support for C++ direct initializers that involve dependent
...
types or type-dependent expressions.
llvm-svn: 80143
2009-08-26 21:14:46 +00:00