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
696a3f199b
Factor declaration building out to Sema::BuildUsingDeclaration.
...
llvm-svn: 80337
2009-08-28 05:40:36 +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
Ted Kremenek
108f2f6aa7
Update checker build.
...
llvm-svn: 80321
2009-08-28 00:30:56 +00:00
Ted Kremenek
aeca0954c2
Use C++ style comments.
...
llvm-svn: 80320
2009-08-28 00:24:55 +00:00
Ted Kremenek
d032fcce5c
Implement: <rdar://problem/6337132> CWE-273: Failure to Check Whether Privileges
...
Were Dropped Successfully
Patch by Geoff Keating!
llvm-svn: 80313
2009-08-28 00:08:09 +00:00
Ted Kremenek
30cbea5cad
Update exports list.
...
llvm-svn: 80306
2009-08-27 23:50:46 +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
Chris Lattner
7ef882dca0
convert to filecheck and force a triple so that this passes on big
...
endian hosts. Fixes PR4792
llvm-svn: 80301
2009-08-27 23:22:19 +00:00
Ted Kremenek
ce499c2078
CFG construction: Abort CFG construction when processing a CompoundStmt if any
...
of its subexpressions resulted in a "bad CFG".
llvm-svn: 80298
2009-08-27 23:16:26 +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
80110179f4
Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.
...
llvm-svn: 80289
2009-08-27 22:01:41 +00:00
Eli Friedman
8a46219c57
Add __builtin_memchr (used by GNU libstdc++).
...
llvm-svn: 80288
2009-08-27 22:00:18 +00:00
Eli Friedman
ff083ef429
Clean up CodeGenFunction::EmitCastLValue to use the cast kind. Error
...
out for user-defined conversions instead of crashing.
llvm-svn: 80282
2009-08-27 21:19:33 +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
bda4ef15ce
Fix for PR4794 (instantiating friend class decl); this version shouldn't
...
cause any regressions.
llvm-svn: 80277
2009-08-27 19:11:42 +00:00
Sebastian Redl
880a348b52
Extend the exception spec test even further. Now I need to implement this.
...
llvm-svn: 80276
2009-08-27 19:07:16 +00:00
Eli Friedman
ba7908796a
Remove unnecessary include.
...
llvm-svn: 80275
2009-08-27 19:02:44 +00:00
Eli Friedman
972931e25d
Don't create a junk file in the source directory.
...
llvm-svn: 80274
2009-08-27 19:01:37 +00:00
Eli Friedman
1e97108bdd
Back out bad piece of r80272. Will look at fixing this a different way.
...
llvm-svn: 80273
2009-08-27 18:44:04 +00:00
Eli Friedman
7a61407d0b
PR4794: Make instantiating friend class decls not crash.
...
llvm-svn: 80272
2009-08-27 18:38:56 +00:00
Anders Carlsson
20d1332d76
Add an InOverloadResolution flag to TryCopyInitialization.
...
llvm-svn: 80261
2009-08-27 17:37:39 +00:00
Anders Carlsson
271e3a4d47
Remove more default arguments.
...
llvm-svn: 80260
2009-08-27 17:30:43 +00:00
Anders Carlsson
ef4c72135f
Remove default arguments from TryImplicitConversion and fix a bug found in the process.
...
llvm-svn: 80258
2009-08-27 17:24:15 +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
Anders Carlsson
03068aa077
Remove default argument from TryCopyInitialization.
...
llvm-svn: 80256
2009-08-27 17:18:13 +00:00
Anders Carlsson
5ec4abf268
Revert the flags change for now, I have a better idea for this.
...
llvm-svn: 80255
2009-08-27 17:14:02 +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
Anders Carlsson
2f7e956f16
Add a OverloadResolutionFlags and start converting some of the overload methods over to using it instead of bools arguments.
...
llvm-svn: 80248
2009-08-27 16:01:18 +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
Anders Carlsson
35d6e3e710
Don't check member and base initializers if the constructor is dependent.
...
llvm-svn: 80211
2009-08-27 05:57:30 +00:00
Anders Carlsson
e0eebb3ee4
Use early returns to avoid indentation.
...
llvm-svn: 80209
2009-08-27 05:45:01 +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
574315a0fa
Add a BuildCXXTemporaryObjectExpr and use it so default arguments will be instantiated correctly for temporary object expressions.
...
llvm-svn: 80206
2009-08-27 05:08:22 +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
b414ef6f18
Testcase for an almost recent checkin.
...
llvm-svn: 80189
2009-08-27 01:09:45 +00:00
Mike Stump
a5f00ef372
Cleanups.
...
llvm-svn: 80185
2009-08-27 00:29:21 +00:00