Benjamin Kramer
2bd4cee516
StringRefize.
...
llvm-svn: 112718
2010-09-01 17:28:48 +00:00
Douglas Gregor
57879faf91
Make it clear that libclang does not modify the command-line arguments
...
it is given.
llvm-svn: 112717
2010-09-01 16:43:19 +00:00
Douglas Gregor
920cadf9ae
Add test for nothing... i.e., the contents of a USR for using directives
...
llvm-svn: 112716
2010-09-01 16:37:17 +00:00
Douglas Gregor
eece0eaa85
Transfer calling-convention attributes down to member function pointers.
...
llvm-svn: 112715
2010-09-01 16:29:03 +00:00
Chris Lattner
988fd16060
add a new version of mingw, patch by İsmail "cartman" Dönmez
...
in PR8049
llvm-svn: 112710
2010-09-01 15:51:58 +00:00
Chris Lattner
0073962025
when emitting an error about a missing } in a compound statement, emit
...
a "to match this {" note, pointing out the opener.
llvm-svn: 112709
2010-09-01 15:49:26 +00:00
Douglas Gregor
01a430134f
Implement libclang support for using directives (cursor + visitation +
...
suppressing USRs). Also, fix up the source location information for
using directives so that the declaration location refers to the
namespace name.
llvm-svn: 112693
2010-09-01 03:07:18 +00:00
Ted Kremenek
0ef508d301
Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
...
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.
Fixes <rdar://problem/8380046>.
llvm-svn: 112691
2010-09-01 01:21:15 +00:00
Chris Lattner
d426c8eae3
fix rdar://8360877 a really nasty miscompilation in Boost.Xpressive
...
caused by my ABI work. Passing:
struct outer {
int x;
struct epsilon_matcher {} e;
int f;
};
as {i32,i32} isn't safe, because the offset of the second element
needs to be at 8 when it is interpreted as a memory value.
llvm-svn: 112686
2010-09-01 00:50:20 +00:00
Chris Lattner
be5eb17536
same refactoring as before, this time on the argument side.
...
llvm-svn: 112684
2010-09-01 00:24:35 +00:00
Chris Lattner
52b3c13149
refactor some code to cut down on redundancy, no functionality change.
...
llvm-svn: 112683
2010-09-01 00:20:33 +00:00
Douglas Gregor
f9e43cef54
Improve location information in the representation of namespace
...
aliases. Previously, the location of the alias was at the "namespace"
keyword. Now, it's on the identifier being declared (as is the custom
for Clang), and we keep a separate source location for the "namespace"
keyword.
Also, added a getSourceRange() member function to NamespaceAliasDecl
to correctly compute the source range.
Finally, removed a bunch of setters from NamespaceAliasDecl and gave
ASTReaderDecl friendship so that it could set the corresponding fields
directly.
llvm-svn: 112681
2010-09-01 00:08:19 +00:00
Fariborz Jahanian
39de024e66
Prevent warning when built with assert off.
...
llvm-svn: 112680
2010-08-31 23:54:38 +00:00
Fariborz Jahanian
eb5a307259
xcode project file update.
...
llvm-svn: 112677
2010-08-31 23:49:56 +00:00
Douglas Gregor
a89314e396
Add libclang support for namespace aliases (visitation + USRs) along
...
with a new cursor kind for a reference to a namespace.
There's still some oddities in the source location information for
NamespaceAliasDecl that I'll address with a separate commit, so the
source locations displayed in the load-namespaces.cpp test will
change.
llvm-svn: 112676
2010-08-31 23:48:11 +00:00
Fariborz Jahanian
abaae2b692
Some support for unicode string constants
...
in wide strings. radar 8360841.
llvm-svn: 112672
2010-08-31 23:34:27 +00:00
Sebastian Redl
a93bb5b807
Implement __has_feature(cxx_inline_namespaces)
...
llvm-svn: 112671
2010-08-31 23:28:47 +00:00
Anton Korobeynikov
1b80c2aaee
Add NetBSD include search path
...
llvm-svn: 112663
2010-08-31 22:39:50 +00:00
John McCall
c265ad253e
Add convenience accessors for determining whether template declarations are definitions.
...
llvm-svn: 112656
2010-08-31 22:21:26 +00:00
Douglas Gregor
f11309e194
Add a new libclang function clang_getTemplateCursorKind(), which
...
determines the kind of declaration that would be generated if the
given template were instantiated. This allows a client to distinguish
among class/struct/union templates and function/member function/static
member function templates.
Also, teach clang_CXXMethod_isStatic() about function templates.
llvm-svn: 112655
2010-08-31 22:12:17 +00:00
John McCall
c134eb5ada
Amusingly, I missed this point of abstraction in all my earlier
...
member-pointer refactoring: dereferencing a member data pointer.
llvm-svn: 112640
2010-08-31 21:07:20 +00:00
Sebastian Redl
bd59576541
Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces.
...
llvm-svn: 112637
2010-08-31 20:53:31 +00:00
Douglas Gregor
a23e8f7a0f
Extend libclang with a new cursor kind that indicates a reference to a
...
template. Such cursors occur, for example, in template specialization
types such as vector<int>. Note that we do not handle the
super-interesting case where the template name is unresolved, e.g.,
within a template.
llvm-svn: 112636
2010-08-31 20:37:03 +00:00
Douglas Gregor
f96abb293a
Add libclang support for class template partial specializations,
...
including a cursor kind, visitation, and USRs.
llvm-svn: 112629
2010-08-31 19:31:58 +00:00
Douglas Gregor
1fbaeb196b
Add a libclang cursor kind, visitation support and USR support for C++
...
class templates.
llvm-svn: 112627
2010-08-31 19:02:00 +00:00
Ted Kremenek
0f5d8bc5fc
Improve CFG printing support for CXXOperatorCallExpr and CXXBindTemporaryExpr.
...
llvm-svn: 112619
2010-08-31 18:47:37 +00:00
Ted Kremenek
128d04dfe8
Explicitly handle CXXOperatorCallExpr when building CFGs. We should treat it the same as CallExprs.
...
Fixes: <rdar://problem/8375510> [Boost] CFGBuilder crash in Boost.Graph
llvm-svn: 112618
2010-08-31 18:47:34 +00:00
Fariborz Jahanian
c6bf0bd51b
AST work to support [C++] [IRgen] for ?: with missing LHS
...
This is also pr7726 and wip. No change in functionality
at this time.
llvm-svn: 112612
2010-08-31 18:02:20 +00:00
Douglas Gregor
713602bb09
Implement basic support for indexing function templates in
...
libclang. This includes:
- Cursor kind for function templates, with visitation logic
- Cursor kinds for template parameters, with visitation logic
- Visitation logic for template specialization types, qualified type
locations
- USR generation for function templates, template specialization
types, template parameter types.
Also happens to fix PR7804, which I tripped across while testing.
llvm-svn: 112604
2010-08-31 17:01:39 +00:00
Chris Lattner
04dc957260
Add support for windows x86-64 varargs, patch by Cameron Esfahani!
...
llvm-svn: 112603
2010-08-31 16:44:54 +00:00
Chris Lattner
0f0492e69c
improve isHexaLiteral to work with escaped newlines and trigraphs,
...
patch by Francois Pichet!
llvm-svn: 112602
2010-08-31 16:42:00 +00:00
Douglas Gregor
12bca22e91
libclang indexing support for C++ constructors, destructors, and
...
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.
llvm-svn: 112600
2010-08-31 14:41:23 +00:00
Douglas Gregor
db2be6a592
Add a simple test for indexing namespaces
...
llvm-svn: 112598
2010-08-31 13:31:19 +00:00
John McCall
5d865c3292
Teach IR generation to return 'this' from constructors and destructors
...
under the ARM ABI.
llvm-svn: 112588
2010-08-31 07:33:07 +00:00
Chandler Carruth
fc0e2a03fa
Fix a regression that allowed clearly ill formed code. The diagnostic is still
...
terrible, FIXME left to do a proper job of diagnosing this.
llvm-svn: 112581
2010-08-31 05:42:40 +00:00
Douglas Gregor
79a2788512
Revert my lame attempt at appeasing the CFGBuilder
...
llvm-svn: 112580
2010-08-31 05:36:56 +00:00
Douglas Gregor
400f59763b
When provide code completions for a variadic Objective-C method
...
declaration send or a variadic function call, collapse the ", ..."
into the parameter before it, so that we don't get a second
placeholder.
llvm-svn: 112579
2010-08-31 05:13:43 +00:00
Douglas Gregor
f5d453d067
Teach the CFGBuilder not do die on CXXBindTemporaryExpr, CXXOperatorCallExpr. Fixes a Boost.Graph crasher.
...
llvm-svn: 112578
2010-08-31 05:10:27 +00:00
Sebastian Redl
7dcb155c18
Implement the __has_nothrow trait family, by Steven Watanabe.
...
llvm-svn: 112577
2010-08-31 04:59:00 +00:00
Ted Kremenek
b8691e6081
Add range of return value expression in ReturnUndefChecker. Patch by Jim Goodnow II!
...
llvm-svn: 112569
2010-08-31 01:35:32 +00:00
Sebastian Redl
5a5f2c76b6
Enable inline namespaces in C++03 as an extension.
...
llvm-svn: 112566
2010-08-31 00:36:45 +00:00
Sebastian Redl
35034569c7
Add a forgotten place where the enclosing namespace set matters, plus a big testcase for inline namespace fun.
...
llvm-svn: 112565
2010-08-31 00:36:40 +00:00
Sebastian Redl
b5c2baa2d7
Enable inline namespaces in the AST.
...
llvm-svn: 112564
2010-08-31 00:36:36 +00:00
Sebastian Redl
50c682585f
Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.
...
llvm-svn: 112563
2010-08-31 00:36:30 +00:00
Sebastian Redl
4f08c96a8b
Decl::getEnclosingNamespaceContext has no reason to explicitly skip transparent contexts, and would be wrong to do so with inline namespaces.
...
llvm-svn: 112562
2010-08-31 00:36:23 +00:00
Douglas Gregor
4afc236cee
When instantiating a function type, instantiate the return type before
...
instantiating the parameters. In a perfect world, this wouldn't
matter, and compilers are free to instantiate in any order they
want. However, every other compiler seems to instantiate the return
type first, and some code (in this case, Boost.Polygon) depends on
this and SFINAE to avoid instantiating something that shouldn't be
instantiated.
We could fight this battle, and insist that Clang is allowed to do
what it does, but it's not beneficial: it's more predictable to
instantiate this way, in source order. When we implement
late-specified return types, we'll need to instantiate the return type
last when it was late-specified, hence the FIXME.
We now compile Boost.Polygon properly.
llvm-svn: 112561
2010-08-31 00:26:14 +00:00
Douglas Gregor
4d13d10df2
Add a missing return. Bug noticed by Dawn Perchik!
...
llvm-svn: 112552
2010-08-30 23:30:49 +00:00
Douglas Gregor
a477e2afe7
When template substitution into a template parameter reduces the level
...
of that parameter, reduce the level by the number of active template
argument lists rather than by 1. The number of active template
argument lists is only > 1 when we have a class template partial
specialization of a member template of a class template that itself is
a member template of another class template.
... and Boost.MSM does this. Fixes PR7669.
llvm-svn: 112551
2010-08-30 23:23:59 +00:00
Chris Lattner
dec7334218
silence a warning
...
llvm-svn: 112549
2010-08-30 23:11:03 +00:00
Gabor Greif
1286617c64
zap tabs
...
llvm-svn: 112541
2010-08-30 22:25:56 +00:00
Chris Lattner
a48fbe8c53
Fix PR8029, a x86-32 ABI regression in introduced in r112211
...
llvm-svn: 112537
2010-08-30 22:03:23 +00:00
Gabor Greif
3fe617cc09
add two more use-cases (explicit instantiation) that should pass now
...
llvm-svn: 112533
2010-08-30 21:45:06 +00:00
Gabor Greif
718d515b3a
fix dual aspect of PR8007,
...
namely when the friend function prototype is already used
at the point of the template definition that is supposed
to inject the friend function. Testcase verifies four
scenarios.
I would like receive some code review for this.
llvm-svn: 112524
2010-08-30 21:10:05 +00:00
Douglas Gregor
66d2c8e886
Perform the function-to-pointer adjustment during template argument
...
deduction where the parameter is a function reference, function
pointer, or member function pointer and the argument is an overloaded
function. Fixes <rdar://problem/8360106>, a template argument
deduction issue found by Boost.Filesystem.
llvm-svn: 112523
2010-08-30 21:04:23 +00:00
Bob Wilson
b9225f7f85
Translate NEON vmovn builtin to a vector truncation instead of using an llvm
...
intrinsic.
llvm-svn: 112504
2010-08-30 19:57:13 +00:00
Tom Care
9026d4b488
Adjusted the semantics of assign checking in IdempotentOperationChecker
...
- Fixed a regression where assigning '0' would be reported
- Changed the way self assignments are filtered to allow constant testing
- Added a test case for assign ops
- Fixed one test case where a function pointer was not considered constant
- Fixed test cases relating to 0 assignment
llvm-svn: 112501
2010-08-30 19:25:43 +00:00
Alexis Hunt
3b7918625c
Revert my user-defined literal commits - r1124{58,60,67} pending
...
some issues being sorted out.
llvm-svn: 112493
2010-08-30 17:47:05 +00:00
Chris Lattner
5f183aa592
add a fixme.
...
llvm-svn: 112491
2010-08-30 17:11:14 +00:00
Chris Lattner
7a9e9e7d76
use 'features' instead of 'PP->getLangOptions'.
...
llvm-svn: 112490
2010-08-30 17:09:08 +00:00
Douglas Gregor
561eceb4c4
Heap-allocate the attribute vectors in
...
ASTContext::DeclAttrs. Otherwise, iterators will go stale when the
DenseMap reallocates, which can cause crashes when, e.g., looping over
the attributes in a template to instantiate them and add the results
to the instantiation of that template.
llvm-svn: 112488
2010-08-30 16:49:28 +00:00
Douglas Gregor
1262b0636e
Fix an corner-case assertion introduced by the refactoring in r112258;
...
when we're taking the address of a unresolvable value, it might be an
implicit member access. Fixes some Boost.Spirit regressions.
llvm-svn: 112487
2010-08-30 16:00:47 +00:00
Douglas Gregor
3cc2648b47
Now that GCC will have #pragma push/pop (in GCC 4.6), allow the
...
#pragma without requiring it to be in the "clang" namespace, from
Louis Gerbarg!
llvm-svn: 112484
2010-08-30 15:15:34 +00:00
Douglas Gregor
f62c5294c1
Emulate (some of) Microsoft's looser semantic checking of exception
...
specifications, from Martin Vejnar!
llvm-svn: 112482
2010-08-30 15:04:51 +00:00
Douglas Gregor
759ef23bb8
In Microsoft compatibility mode, don't parse the exponent as part of
...
the pp-number in a hexadecimal floating point literal, from Francois
Pichet! Fixes PR7968.
llvm-svn: 112481
2010-08-30 14:50:47 +00:00
Douglas Gregor
2b1bbecb6b
Predeclare class type_info in Microsoft mode, from Francois Pichet!
...
llvm-svn: 112478
2010-08-30 14:44:26 +00:00
Douglas Gregor
cfcb942267
Add test case from PR6952, which now works (thanks to Gabor).
...
llvm-svn: 112477
2010-08-30 14:37:53 +00:00
Douglas Gregor
2c7d9290ee
Add redeclaration checking for static data members and fix a corner
...
case with redeclaration checking for fields, from Faisal Vali!
Fixes PR7970.
llvm-svn: 112476
2010-08-30 14:32:14 +00:00
Douglas Gregor
5209a0d850
Fix CMake dependencies
...
llvm-svn: 112475
2010-08-30 14:31:03 +00:00
Duncan Sands
f610b5b622
Straighten out target triples provided on the command line
...
before using them.
llvm-svn: 112468
2010-08-30 09:42:39 +00:00
Alexis Hunt
e3675ef0f3
Two minor fixes to user-defined literals:
...
- Zero-initialize UDLData so that crashes stop
- Stop complaining that we can't emit them (we most certainly can)
llvm-svn: 112467
2010-08-30 09:27:16 +00:00
Chandler Carruth
9ed87ba797
Add some braces for sanity and GCC silence. These became unbalanced in r112122,
...
so please review echristo and let me know if the logic is wrong now.
llvm-svn: 112466
2010-08-30 07:36:24 +00:00
Alexis Hunt
8591e9e06f
Fix some test-breaking that snuck into my previous commit
...
llvm-svn: 112460
2010-08-29 22:39:32 +00:00
Alexis Hunt
79eb5469e0
Implement C++0x user-defined string literals.
...
The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.
llvm-svn: 112458
2010-08-29 21:26:48 +00:00
Douglas Gregor
981a0c4613
When providing a code completion for an Objective-C message send, drop
...
the parameter names from the completions, e.g., provide
withString:(NSString *)
instead of
withString:(NSString *)string
since the parameter name is, by convention, redundant with the
selector piece that precedes it and the completions can get
unnecessarily long.
llvm-svn: 112456
2010-08-29 19:47:46 +00:00
Douglas Gregor
99129efdd3
Improve code completion for initializer lists in constructors. Instead
...
of prioritizing just by initialization order, we bump the priority of
just the *next* initializer in the list, and leave everything else at
the normal priority. That way, if one intentionally skips the
initialization of a base or member (to get default initialization),
we'll still get ordered completion for the rest.
llvm-svn: 112454
2010-08-29 19:27:27 +00:00
Douglas Gregor
fdce48b0ca
Add missing test case for constructor-initializer code completions
...
llvm-svn: 112453
2010-08-29 19:20:21 +00:00
Fariborz Jahanian
161848a030
ObjClang++: Allow declaration of block variable in a collection
...
statement header (fixes radar 8295106).
llvm-svn: 112443
2010-08-29 17:20:53 +00:00
Zhongxing Xu
b0a6de9e8f
Add comments.
...
llvm-svn: 112414
2010-08-29 05:16:31 +00:00
Bob Wilson
0e7a398936
Translate NEON vaddl, vaddw, vsubl, and vsubw builtins to llvm add/sub
...
with zext/sext operations, instead of to llvm intrinsics. (We can also
get rid of the clang builtins and handle these entirely in the arm_neon.h
header if there is a way to express vector sext/zext in C.)
llvm-svn: 112413
2010-08-29 05:14:28 +00:00
John McCall
49039d4afb
Complain if a __pragma isn't terminated.
...
llvm-svn: 112392
2010-08-29 01:09:54 +00:00
John McCall
89e925d78e
Add support for Microsoft's __pragma in the preprocessor.
...
Patch by Francois Pichet!
llvm-svn: 112391
2010-08-28 22:34:47 +00:00
John McCall
0856906b1e
When perform exact-qualifier-match template argument deduction,
...
properly account for the possibility that certain opaque types
might be more qualified than they appear. Fixes PR7708.
llvm-svn: 112390
2010-08-28 22:14:41 +00:00
John McCall
fb3f9ba969
If filtering a lookup result leaves it ambiguous, keep the ambiguity
...
kind. Fixes PR7252.
llvm-svn: 112383
2010-08-28 20:17:00 +00:00
Ted Kremenek
52ac860d9c
Delete the relaxedLiveness object in the dtor of AnalysisContext.
...
llvm-svn: 112380
2010-08-28 18:59:04 +00:00
Chris Lattner
0e7c68da96
improve comment, patch by Vladimir Kirillov!
...
llvm-svn: 112374
2010-08-28 16:26:18 +00:00
Gabor Greif
ae849e4407
simplify by relying on cascading operator->
...
llvm-svn: 112373
2010-08-28 15:46:56 +00:00
Gabor Greif
122f1eb2b8
simplify
...
llvm-svn: 112372
2010-08-28 15:42:30 +00:00
Nick Lewycky
4a9da315d3
Fix copy+paste error in comment.
...
llvm-svn: 112370
2010-08-28 13:52:51 +00:00
Gabor Greif
b0c557be1e
add another test for PR8007
...
this is still failing, need to come up with a fix
(but we are in good company as the first gcc version
pass this test will be v4.6)
llvm-svn: 112369
2010-08-28 12:12:45 +00:00
Gabor Greif
156315b7d8
the target of the link uses the singular form, so do we too
...
llvm-svn: 112367
2010-08-28 11:05:27 +00:00
Gabor Greif
e27ea5c92e
typo
...
llvm-svn: 112366
2010-08-28 11:03:06 +00:00
Gabor Greif
e6523ea915
suppress annoying textual repetition as 'aka'
...
llvm-svn: 112365
2010-08-28 10:40:52 +00:00
Argyrios Kyrtzidis
43b205796f
Fix the memory leak of FloatingLiteral/IntegerLiteral.
...
For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers.
Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
the APFloat/APInt values will never get freed.
I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral.
Fixes rdar://7637185
llvm-svn: 112361
2010-08-28 09:06:06 +00:00
John McCall
1177ff1740
That's not the right direction to compute notional accessibility in at all.
...
llvm-svn: 112360
2010-08-28 08:47:21 +00:00
John McCall
c6af8f4689
Fix build. Bad me, adding last-minute assertions.
...
llvm-svn: 112359
2010-08-28 08:10:32 +00:00
John McCall
96329678e4
When checking access control for an instance member access on
...
an object of type I, if the current access target is protected
when named in a class N, consider the friends of the classes P
where I <= P <= N and where a notional member of N would be
non-forbidden in P.
llvm-svn: 112358
2010-08-28 07:56:00 +00:00
Gabor Greif
468aa3b20c
check whether sema issues a redefinition error
...
llvm-svn: 112347
2010-08-28 02:00:22 +00:00
Gabor Greif
34ecff269e
perform cheap test first
...
llvm-svn: 112346
2010-08-28 01:58:12 +00:00
Nick Lewycky
02d13d1356
Ignore this flag too, Clang doesn't seem to use random numbers internally.
...
llvm-svn: 112342
2010-08-28 01:01:21 +00:00
Gabor Greif
73ddbc51ab
note to self: save before committing; add PR
...
llvm-svn: 112339
2010-08-28 00:48:36 +00:00
Gabor Greif
1d28820888
fix test by applying it in top namespace: PR8007 only showed up this way
...
llvm-svn: 112338
2010-08-28 00:45:56 +00:00
Ted Kremenek
d7478d6010
Update test case, with comment to later investigate the correct behavior. Now the behavior is at least consistent.
...
llvm-svn: 112335
2010-08-28 00:19:12 +00:00
Ted Kremenek
82bfc86792
Explicitly handle CXXExprWithTemporaries during CFG construction by just visiting the subexpression. While we don't do anything intelligent right now, this obviates a bogus -Wunreahable-code warning reported in PR 6130.
...
llvm-svn: 112334
2010-08-28 00:19:02 +00:00
Gabor Greif
b6aba3ef28
fix PR8007
...
reordering and redefinition issues still may linger,
I plan to nail them next
llvm-svn: 112333
2010-08-28 00:16:06 +00:00
Douglas Gregor
eaeeca9afe
Basic code completion support for the base and member initializers in
...
a constructor.
llvm-svn: 112330
2010-08-28 00:00:50 +00:00
Gabor Greif
a56984c72f
reproduction recipe for PR8007, expected to fail for now, review welcome
...
llvm-svn: 112326
2010-08-27 23:39:49 +00:00
Sebastian Redl
6766794c0b
Parser support for inline namespaces
...
llvm-svn: 112320
2010-08-27 23:12:46 +00:00
Sebastian Redl
5bfe034ecc
Comment and move another ASTReader member.
...
llvm-svn: 112319
2010-08-27 23:12:39 +00:00
Sebastian Redl
cc6458890d
Update comment after Chandler's change.
...
llvm-svn: 112318
2010-08-27 23:12:36 +00:00
Douglas Gregor
fcee9460c6
Miscellaneous found by inspection with John and Sebastian
...
llvm-svn: 112315
2010-08-27 22:55:10 +00:00
Tom Care
71cc9d886a
Added checking of (x == x) and (x != x) to IdempotentOperationChecker and updated test cases flagged by it.
...
llvm-svn: 112313
2010-08-27 22:50:47 +00:00
Tom Care
98e679508d
Enabled relaxed LiveVariables analysis in the path-sensitive engine to increase the coverage of bugs. Primarily affects IdempotentOperationChecker.
...
- Migrated a temporarily separated test back to its original file (bug has been fixed, null-deref-ps-temp.c -> null-deref-ps.c)
- Changed SymbolManager to use relaxed LiveVariables
- Updated several test cases that the IdempotentOperationChecker class now flags
- Added test case to test relaxed LiveVariables use by the IdempotentOperationChecker
llvm-svn: 112312
2010-08-27 22:46:32 +00:00
Tom Care
f7b7067c4d
Remove an assertion in UnreachableCodeChecker that can be triggered by bugs in other checkers.
...
llvm-svn: 112310
2010-08-27 22:37:31 +00:00
Tom Care
c29c91aaaa
Fix bug in IdempotentOperationChecker where an assumption would not get updated properly.
...
llvm-svn: 112309
2010-08-27 22:35:28 +00:00
Chris Lattner
1ba644575d
handle :: in selectors in objc++ mode, rdar://8366474
...
llvm-svn: 112307
2010-08-27 22:32:41 +00:00
Tom Care
e5aa30c722
Add alternate version of LiveVariables analysis that does not kill liveness at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs.
...
- Added killAtAssign flag to LiveVariables
- Added relaxed LiveVariables to AnalysisContext with an accessor
llvm-svn: 112306
2010-08-27 22:30:10 +00:00
Ted Kremenek
378e93c210
Add source file I meant to include in my previous commit.
...
llvm-svn: 112303
2010-08-27 21:57:20 +00:00
Douglas Gregor
7bddb3cac3
Improve wording of diagnostic complaining about a non-void* pointer as the first parameter of operator delete
...
llvm-svn: 112298
2010-08-27 21:39:15 +00:00
Ted Kremenek
ae9e221513
Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.
...
Implements <rdar://problem/8274883>.
llvm-svn: 112296
2010-08-27 21:34:58 +00:00
Ted Kremenek
2c2c5f3789
Fix copy-paste in doxygen comment.
...
llvm-svn: 112295
2010-08-27 21:34:51 +00:00
Douglas Gregor
ac322ec9b9
Implement the "call super" code completion for C++. If the virtual
...
member function you're typing in overrides another virtual function,
this fills in a (qualified!) call to that virtual function to make
such delegation easy.
llvm-svn: 112294
2010-08-27 21:18:54 +00:00
Douglas Gregor
9704c75b1f
Teach clang_codeComplete to always sort its code-completion results
...
llvm-svn: 112292
2010-08-27 21:13:41 +00:00
Chris Lattner
212a492063
fix incorrect MM_HINT_ definitions, PR8011
...
llvm-svn: 112283
2010-08-27 20:10:06 +00:00
John McCall
1ababa63de
Continue to instantiate sub-statements in a CompoundStmt as long as
...
we don't see a DeclStmt (failure to instantiate which generally causes
panic).
llvm-svn: 112282
2010-08-27 19:56:05 +00:00
Devang Patel
96b7f55a03
Debug info for friends!
...
Patch originally by Alexander Herz.
llvm-svn: 112275
2010-08-27 17:47:47 +00:00
Douglas Gregor
28c7843ec4
Suggest "const" and "volatile" code completions after a function
...
declarator, the very definition of "low-hanging fruit".
llvm-svn: 112274
2010-08-27 17:35:51 +00:00
Bob Wilson
7b0d032d0c
Add the new alignment arguments for NEON load/store intrinsics, based on the
...
types of the pointer address expressions used with those intrinsics.
llvm-svn: 112272
2010-08-27 17:14:29 +00:00
Dan Gohman
8b4c320778
createMainFileID doesn't need its IncludePos argument, since
...
the main file isn't an included file, and the IncludePos is
always SourceLocation().
llvm-svn: 112269
2010-08-27 15:44:11 +00:00
Douglas Gregor
c2cb2e23bc
When code-completing inside an Objective-C method, give a slight
...
priority boost to methods with the same selector.
llvm-svn: 112268
2010-08-27 15:29:55 +00:00
Douglas Gregor
6fc0413e59
Add a super-cool code completion for send-to-super. When we're typing
...
a message send to "super" from a method that appears to be meant to
override a superclass method (same kind, same selector, same argument
types), provide a "super" completion that fills in the selector along
with forwarding the method's arguments (as placeholders).
llvm-svn: 112263
2010-08-27 15:10:57 +00:00
Douglas Gregor
f0b38ebb53
Fix CMake dependencies, from Fernando Pelliccioni!
...
llvm-svn: 112261
2010-08-27 14:18:05 +00:00
John McCall
8d08b9b408
Propagate whether an id-expression is the immediate argument of
...
an '&' expression from the second caller of ActOnIdExpression.
Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.
Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.
Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.
llvm-svn: 112258
2010-08-27 09:08:28 +00:00
Douglas Gregor
f5bae22db7
Don't recurse twice when we can recurse once
...
llvm-svn: 112246
2010-08-27 00:11:28 +00:00
John McCall
faf5fb4b78
One who seeks knowledge learns something new every day.
...
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.
llvm-svn: 112244
2010-08-26 23:41:50 +00:00
Devang Patel
b0958c7699
test case for r112238.
...
llvm-svn: 112239
2010-08-26 22:54:33 +00:00
Ted Kremenek
036223bdcf
Fix horrible GRExprEngine bug where switch statements with no 'case:' statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>.
...
llvm-svn: 112233
2010-08-26 22:19:33 +00:00
Ted Kremenek
c8bd967430
Remove redundant cast<...>.
...
llvm-svn: 112229
2010-08-26 22:04:01 +00:00
Dan Gohman
ce46f02a32
Fix a typo.
...
llvm-svn: 112219
2010-08-26 21:27:06 +00:00
Chris Lattner
d7e54804ee
improve comments.
...
llvm-svn: 112214
2010-08-26 20:08:43 +00:00
Chris Lattner
07b71c4eb1
add radar #
...
llvm-svn: 112212
2010-08-26 20:05:48 +00:00
Chris Lattner
d774ae9ed1
fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes in
...
memory (as required) the later now passes in an xmm register. This
fixes gcc.dg/compat/vector_1 on x86-32.
llvm-svn: 112211
2010-08-26 20:05:13 +00:00
Fariborz Jahanian
4fcc97f2f9
clang.xcodeproj updated.
...
llvm-svn: 112209
2010-08-26 19:58:26 +00:00
Chris Lattner
69e683fb35
vector of long and ulong are also classified as INTEGER in x86-64 abi,
...
this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi
test.
llvm-svn: 112205
2010-08-26 18:13:50 +00:00
Chris Lattner
46830f2fd6
1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
...
this fixes a miscompilation on the included testcase, rdar://8359248
llvm-svn: 112201
2010-08-26 18:03:20 +00:00
John McCall
c162d1bbe4
...I forgot to check my new test after adding it, and lo, there's slightly different
...
behavior in C than in C++ (which is what the original test case was).
llvm-svn: 112199
2010-08-26 17:42:30 +00:00
John McCall
a3707cc7e2
Make sure we clear TypeSpecOwned when setting TypeSpecType to something when
...
it might previously have been a tag TST.
llvm-svn: 112196
2010-08-26 17:22:34 +00:00
Douglas Gregor
9ac1ad141b
Tweak the @selector completion to collapse multiple informative and
...
typed-text blocks into one of each.
llvm-svn: 112194
2010-08-26 16:46:39 +00:00
Douglas Gregor
9be0ed4f3f
When code-completing a potential call to a C++ non-static member
...
function, take into account the qualifiers on the object argument
(e.g., what will become "this"), filtering around uncallable member
functions and giving a slight priority boost to those with
exactly-matching qualifiers.
llvm-svn: 112193
2010-08-26 16:36:48 +00:00
John McCall
7a1da89f11
Work around a gcc warning.
...
llvm-svn: 112192
2010-08-26 16:36:35 +00:00
Argyrios Kyrtzidis
7648fb464b
Fix miscompilation. The cookie was not used when new'ing arrays with multiple dimensions.
...
llvm-svn: 112188
2010-08-26 15:23:38 +00:00
Benjamin Kramer
ead810e42b
clang-interpreter: libFrontend depends on libSerialization. Fix linux build by changing the link order.
...
llvm-svn: 112187
2010-08-26 15:21:38 +00:00
Douglas Gregor
67c692cc3d
Implement code completion for @selector expressions
...
llvm-svn: 112186
2010-08-26 15:07:07 +00:00
Douglas Gregor
78ccc2cb00
More ordering tweaks in this silly, silly test
...
llvm-svn: 112184
2010-08-26 14:20:32 +00:00
Gabor Greif
e4d36a2415
mark boost's tracking bug as fixed
...
llvm-svn: 112183
2010-08-26 14:20:18 +00:00
Douglas Gregor
33551892fa
Tweak wording in an assertion, from dawn@burble.org.
...
llvm-svn: 112182
2010-08-26 14:07:34 +00:00
Benjamin Kramer
1921fac97e
Update clang-interpreter for recent DiagnosticClient ownership changes.
...
llvm-svn: 112181
2010-08-26 13:48:56 +00:00
Douglas Gregor
49f67ce4b3
Move the sorting of code-completion results out of the main path and
...
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
Provide a libclang function that sorts the results.
3rd try. How embarrassing.
llvm-svn: 112180
2010-08-26 13:48:20 +00:00
John McCall
ddeeb1022f
Missed a couple.
...
llvm-svn: 112179
2010-08-26 10:20:09 +00:00
John McCall
3731f1234f
Apparently gcc doesn't always get injected class names right.
...
llvm-svn: 112178
2010-08-26 09:52:08 +00:00
John McCall
b1be523752
Move things around so that Sema.h no longer depends on even DeclBase.h.
...
It still depends on Type because DeclarationName.h does.
llvm-svn: 112177
2010-08-26 09:15:37 +00:00
Chris Lattner
51e1cc2fe2
tame an assertion, fixing rdar://8357396
...
llvm-svn: 112174
2010-08-26 06:28:35 +00:00
Daniel Dunbar
d2bc53e925
CGValue: Increase width of allowed alignment. We could switch to log2, but we
...
don't currently need the bits anyway.
llvm-svn: 112173
2010-08-26 06:02:12 +00:00
Daniel Dunbar
bef185c835
Revert r112149, "Move the sorting of code-completion results out of the main
...
path and ...", it is failing tests.
llvm-svn: 112161
2010-08-26 03:53:50 +00:00
Daniel Dunbar
60e3749181
Revert r112154, "Fix thinko in sorting operation", it depends on r112149 which
...
doth lay upon the chopping block.
llvm-svn: 112160
2010-08-26 03:53:44 +00:00
Douglas Gregor
54d9c11a01
Tweak test to avoid checking for a specific ordering where none exists
...
llvm-svn: 112159
2010-08-26 03:52:21 +00:00
John McCall
8e7d656a4a
De-memberify the VarDecl and FunctionDecl StorageClass enums.
...
This lets us remove Sema.h's dependency on Expr.h and Decl.h.
llvm-svn: 112156
2010-08-26 03:08:43 +00:00
Douglas Gregor
db967a58eb
Fix thinko in sorting operation
...
llvm-svn: 112154
2010-08-26 02:54:05 +00:00
Dan Gohman
e5334b484a
Fix a typo.
...
llvm-svn: 112151
2010-08-26 02:27:03 +00:00
Douglas Gregor
78ecc499eb
Move the sorting of code-completion results out of the main path and
...
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
Provide a libclang function that sorts the results.
llvm-svn: 112149
2010-08-26 02:23:45 +00:00
John McCall
b45a1e735a
Restore r112114 now that SmallVector<...,0> is safe.
...
llvm-svn: 112148
2010-08-26 02:13:20 +00:00
Eric Christopher
2a9898f0a2
Move some type defines from smmintrin.h to emmintrin.h to match where
...
gcc defines them.
llvm-svn: 112146
2010-08-26 02:09:25 +00:00
Ted Kremenek
a594082210
Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.
...
llvm-svn: 112139
2010-08-26 01:42:22 +00:00
Daniel Dunbar
f241019e24
Driver/Darwin: Switch back to old toolchain, looks like new one isn't quite
...
ready yet.
llvm-svn: 112138
2010-08-26 01:41:44 +00:00
Chris Lattner
8c3283857e
zap dead ctor
...
llvm-svn: 112132
2010-08-26 01:17:33 +00:00
Daniel Dunbar
e3d87d21f3
IRgen/NEON: Fix codegen of vzip and vzipq.
...
- Will be adding an executable test case to test-suite repo.
llvm-svn: 112126
2010-08-26 00:55:57 +00:00
Daniel Dunbar
b8f7a14575
Driver: Fix thinko where I switched to always using the old toolchain, instead
...
of always using the new toolchain.
llvm-svn: 112125
2010-08-26 00:55:55 +00:00
Daniel Dunbar
e9f7151485
Driver/Darwin: Pass the right arch specific dir for ARM, when linking.
...
llvm-svn: 112124
2010-08-26 00:55:52 +00:00
Daniel Dunbar
b6ceacf623
Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own
...
header.", it is teh broken.
llvm-svn: 112123
2010-08-26 00:52:50 +00:00
Eric Christopher
a613f56559
With lax vector conversions (the default) make sure we convert between two
...
vectors that are the same size. Fix up testcases accordingly and add a new one
to make sure we still error if lax vector conversions are disabled.
Fixes rdar://8328190
llvm-svn: 112122
2010-08-26 00:42:16 +00:00
Douglas Gregor
1099865124
Revert "Move the sorting of code-completion results out of the main path and
...
into the clients", because the C standard library sucks. Where's my
stable sort, huh?
llvm-svn: 112121
2010-08-26 00:30:24 +00:00
Fariborz Jahanian
348dcffb14
Add DelayedDiagnostic.h to xcode project file.
...
llvm-svn: 112119
2010-08-26 00:17:38 +00:00
Fariborz Jahanian
40f9798d06
More update of clang.xcodeproj for recent changes.
...
llvm-svn: 112117
2010-08-26 00:13:24 +00:00
Fariborz Jahanian
3ee8bcebd0
Update clang.xcodeproj for recent refactorings.
...
llvm-svn: 112116
2010-08-26 00:06:40 +00:00
Eric Christopher
52d5ec11cc
Fix typo in error message and testcase.
...
llvm-svn: 112115
2010-08-25 23:45:44 +00:00
John McCall
6b48873d50
Pull DelayedDiagnostic and AccessedEntity out into their own header.
...
This works courtesy of the new SmallVector<..., 0> specialization that
doesn't require a complete type. Note that you'll need to pull at least
SmallVector.h from LLVM to compile successfully.
llvm-svn: 112114
2010-08-25 23:44:00 +00:00
Argyrios Kyrtzidis
1f5cfb6446
Revert r112043, static volatiles are removed by the optimizer. Thanks Chris!
...
llvm-svn: 112112
2010-08-25 23:42:51 +00:00
Chris Lattner
9f8b451876
Finally pass "two floats in a 64-bit unit" as a <2 x float> instead of
...
as a double in the x86-64 ABI. This allows us to generate much better
code for certain things, e.g.:
_Complex float f32(_Complex float A, _Complex float B) {
return A+B;
}
Used to compile into (look at the integer silliness!):
_f32: ## @f32
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm1
movd %xmm0, %rcx
movd %ecx, %xmm0
addss %xmm1, %xmm0
movd %xmm0, %edx
shrq $32, %rax
movd %eax, %xmm0
shrq $32, %rcx
movd %ecx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %eax
shlq $32, %rax
addq %rdx, %rax
movd %rax, %xmm0
ret
Now we get:
_f32: ## @f32
movdqa %xmm0, %xmm2
addss %xmm1, %xmm2
pshufd $16, %xmm2, %xmm2
pshufd $1, %xmm1, %xmm1
pshufd $1, %xmm0, %xmm0
addss %xmm1, %xmm0
pshufd $16, %xmm0, %xmm1
movdqa %xmm2, %xmm0
unpcklps %xmm1, %xmm0
ret
and compile stuff like:
extern float _Complex ccoshf( float _Complex ) ;
float _Complex ccosf ( float _Complex z ) {
float _Complex iz;
(__real__ iz) = -(__imag__ z);
(__imag__ iz) = (__real__ z);
return ccoshf(iz);
}
into:
_ccosf: ## @ccosf
## BB#0: ## %entry
pshufd $1, %xmm0, %xmm1
xorps LCPI4_0(%rip), %xmm1
unpcklps %xmm0, %xmm1
movaps %xmm1, %xmm0
jmp _ccoshf ## TAILCALL
instead of:
_ccosf: ## @ccosf
## BB#0: ## %entry
movd %xmm0, %rax
movq %rax, %rcx
shlq $32, %rcx
shrq $32, %rax
xorl $-2147483648, %eax ## imm = 0xFFFFFFFF80000000
addq %rcx, %rax
movd %rax, %xmm0
jmp _ccoshf ## TAILCALL
There is still "stuff to be done" here for the struct case,
but this resolves rdar://6379669 - [x86-64 ABI] Pass and return
_Complex float / double efficiently
llvm-svn: 112111
2010-08-25 23:39:14 +00:00
Argyrios Kyrtzidis
1194d5e3d2
Fix miscompilation. The custom new[]/delete[] methods were not getting called for arrays with more than 1 dimension.
...
llvm-svn: 112107
2010-08-25 23:14:56 +00:00
Tom Care
9a68bccd0c
Add missing null checks in PseudoConstantAnalysis
...
llvm-svn: 112100
2010-08-25 22:46:03 +00:00
Tom Care
82b2a1dada
Improved the handling of blocks and block variables in PseudoConstantAnalysis
...
- Removed the assumption that __block vars are all non-constant
- Simplified some repetitive code in RunAnalysis
- Added block walking support
- Code/comments cleanup
- Separated out test for block pseudoconstants
llvm-svn: 112098
2010-08-25 22:37:26 +00:00
Ted Kremenek
a0d7e434c0
Fix RUN line in test.
...
llvm-svn: 112097
2010-08-25 22:16:06 +00:00
Ted Kremenek
65b2cc061d
When annotating tokens, don't fallback to annotating with a null cursor for cursors that come before a macro instantiation. Fixes <rdar://problem/7974151>.
...
llvm-svn: 112096
2010-08-25 22:16:02 +00:00
Douglas Gregor
ebb7c84891
Move the sorting of code-completion results out of the main path and
...
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
llvm-svn: 112095
2010-08-25 22:15:42 +00:00
John McCall
8302463dc6
Split out a header to hold APIs meant for the Sema implementation from Sema.h.
...
Clients of Sema don't need to know (for example) the list of diagnostics we
support.
llvm-svn: 112093
2010-08-25 22:03:47 +00:00
Dan Gohman
1869693150
Fix a typo.
...
llvm-svn: 112092
2010-08-25 21:59:25 +00:00
Douglas Gregor
0de55cecb2
When combining the code-completion results from Sema long with the
...
code-completion results cached by ASTUnit, sort the resulting result
set. This makes testing far, far easier, so this commit also includes
tests for the previous few fixes.
llvm-svn: 112070
2010-08-25 18:41:16 +00:00
Michael J. Spencer
b2f376bdd0
Fix horrible white space errors.
...
llvm-svn: 112067
2010-08-25 18:17:27 +00:00
Douglas Gregor
f11096c99c
Initialize the translation-unit scope before lexing the first
...
token. The first token might be something that ends up triggering code
completion, which in turn requires a valid Scope. Test case forthcoming.
llvm-svn: 112066
2010-08-25 18:07:12 +00:00
Douglas Gregor
ea14705c8c
Add a missing case
...
llvm-svn: 112065
2010-08-25 18:04:30 +00:00
Douglas Gregor
8e817b6a3a
Fix an off-by-one error when computing the precompiled preamble for
...
code completion. We were allowing the preamble to include the line
that we're code-completing on. Again, testcase is forthcoming.
llvm-svn: 112064
2010-08-25 18:04:15 +00:00
Douglas Gregor
8850aa3f67
Make the cursor kind of macro-name-only completions produced by
...
ASTUnit match those produced directly by code completion. Test case is
forthcoming.
llvm-svn: 112063
2010-08-25 18:03:13 +00:00
Devang Patel
9cd85d1c77
Robustify test.
...
llvm-svn: 112062
2010-08-25 17:32:22 +00:00
Douglas Gregor
39a31a00ea
Test for previous commit
...
llvm-svn: 112059
2010-08-25 17:11:34 +00:00
Douglas Gregor
ea7363732a
Add a code-completion context for "natural language" completions, so
...
that ASTUnit knows not to try to provide completions there.
llvm-svn: 112057
2010-08-25 17:10:00 +00:00
Douglas Gregor
115837041e
Introduce a preprocessor code-completion hook for contexts where we
...
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.
llvm-svn: 112054
2010-08-25 17:04:25 +00:00
Douglas Gregor
334a10a343
Implement __builtin_printf, __builtin_fprintf. Fixes <rdar://problem/8336581>.
...
llvm-svn: 112049
2010-08-25 15:47:31 +00:00
Benjamin Kramer
12367e30e0
Silence a GCC warning saying that unsigned >= UO_PostInc is always true.
...
llvm-svn: 112048
2010-08-25 13:24:04 +00:00
John McCall
e302792b61
GCC didn't care for my attempt at API compatibility, so brute-force everything
...
to the new constants.
llvm-svn: 112047
2010-08-25 11:45:40 +00:00
John McCall
1bcddcaab3
Random space optimization.
...
llvm-svn: 112046
2010-08-25 10:44:55 +00:00
Argyrios Kyrtzidis
dfffabd0e9
Recursive functions should be marked when used from another function. Fixes http://llvm.org/PR7923 .
...
llvm-svn: 112045
2010-08-25 10:34:54 +00:00
John McCall
2536c6da0e
More incremental progress towards not including Expr.h in Sema.h.
...
llvm-svn: 112044
2010-08-25 10:28:54 +00:00
Argyrios Kyrtzidis
b50a088122
Make sure volatile variables are emitted even if static. Fixes rdar://8315219
...
llvm-svn: 112043
2010-08-25 10:15:24 +00:00
Chandler Carruth
5408017356
Rename *PendingImplicitInstantiations to *PendingInstantiations. No
...
functionality changed.
llvm-svn: 112040
2010-08-25 08:44:16 +00:00
John McCall
aab3e41eb2
Split FunctionScopeInfo and BlockScopeInfo into their own header.
...
llvm-svn: 112038
2010-08-25 08:40:02 +00:00
Chandler Carruth
cfe41db403
Support explicit instantiation of function templates and members of class
...
templates when only the declaration is in scope. This requires deferring the
instantiation to be lazy, and ensuring the definition is required for that
translation unit. We re-use the existing pending instantiation queue,
previously only used to track implicit instantiations which were required to be
lazy. Fixes PR7979.
A subsequent change will rename *PendingImplicitInstantiations to
*PendingInstatiations for clarity given its broader role.
llvm-svn: 112037
2010-08-25 08:27:02 +00:00
John McCall
28a0cf7825
Remove Sema.h's dependency on DeclCXX.h.
...
llvm-svn: 112032
2010-08-25 07:42:41 +00:00
John McCall
a1e130be25
Remove the DenseSet dependency from Sema.h.
...
llvm-svn: 112030
2010-08-25 07:03:20 +00:00
John McCall
276321a9ec
Teach Sema to live without CodeCompleteConsumer.h.
...
llvm-svn: 112028
2010-08-25 06:19:51 +00:00
John McCall
1d570a7e16
Remove AnalysisBasedWarnings.h's dependency on Type.h
...
llvm-svn: 112027
2010-08-25 05:56:39 +00:00
John McCall
19c1bfd1b0
Move more stuff out of Sema.h.
...
llvm-svn: 112026
2010-08-25 05:32:35 +00:00
John McCall
d845c79fe2
Sort the forward declarations.
...
llvm-svn: 112024
2010-08-25 04:28:15 +00:00
Daniel Dunbar
5eb22ab7d8
tests: Disable this test for now, it is overly pessimistic and I am not sure how to fix it.
...
llvm-svn: 112023
2010-08-25 03:40:27 +00:00
Daniel Dunbar
ead6824c3c
IRgen: Fix a horrible bug in pointer to bool conversion, which we were treating
...
as a truncation not a comparison to null.
llvm-svn: 112021
2010-08-25 03:32:38 +00:00
John McCall
8d75243029
Expression statements undergo lvalue-to-rvalue conversion in C,
...
but not in C++, so don't emit aggregate loads of volatile references
in null context in C++. Happens to have been caught by an assertion.
We do not get the scalar case right. Volatiles are really broken.
llvm-svn: 112019
2010-08-25 02:50:31 +00:00
John McCall
6caebb15ed
Reformatting.
...
llvm-svn: 112018
2010-08-25 02:45:51 +00:00
Zhongxing Xu
9f077cbc13
Add back clang-wpa. It is useful for experimenting with inter-file analysis.
...
llvm-svn: 112014
2010-08-25 01:15:20 +00:00
Douglas Gregor
416b575edc
When performing completions involving Objective-C method declarations
...
(e.g., for message sends or method declaration/definition
completions), adjust methods that come from a base class.
llvm-svn: 112013
2010-08-25 01:08:01 +00:00
Sebastian Redl
3b1bbf7521
Reorganize and verbosely document some of ASTReader's fields.
...
llvm-svn: 112012
2010-08-25 01:03:37 +00:00
Sebastian Redl
8c0afc3d8d
Remove an unused field in ASTReader
...
llvm-svn: 112011
2010-08-25 01:03:30 +00:00
Argyrios Kyrtzidis
96dbfa2e65
Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed.
...
llvm-svn: 112006
2010-08-25 00:32:19 +00:00
Argyrios Kyrtzidis
3c6cd17c8a
Use a smart pointer instead of delete.
...
llvm-svn: 112005
2010-08-25 00:32:14 +00:00
Argyrios Kyrtzidis
eb430fff0d
Make sure CXXABI is destroyed.
...
llvm-svn: 112004
2010-08-25 00:32:08 +00:00
Fariborz Jahanian
54d75f6925
No need to default synthesize property if implementation
...
has its own getter and setter methods declared.
Fixed 8349319 (nonfragile-abi2).
llvm-svn: 112003
2010-08-25 00:31:58 +00:00
Devang Patel
356e3e0c6a
Fix 'for' loop variables' scope.
...
llvm-svn: 112002
2010-08-25 00:28:56 +00:00
Douglas Gregor
4d755e86b4
Give a slight preference to functions returning "void" when we're
...
performing code completion at the statement level (rather than in an
arbitrary expression).
llvm-svn: 112001
2010-08-24 23:58:17 +00:00
John McCall
3669c80de9
Preserve invalidity of typeof operands in C++.
...
llvm-svn: 111999
2010-08-24 23:41:43 +00:00
Douglas Gregor
45140a9040
In code-completion contexts where both types and other values are
...
present, prefer values to types, since it's more common to compute
with values than it is to declare new entities or perform type
casts. So, tweak the ranking of types vs. other declarations and
constants accordingly.
llvm-svn: 111998
2010-08-24 23:40:45 +00:00
John McCall
7d46051eea
Catch the case of trying to turn '&(X::a)' into a member pointer as well.
...
llvm-svn: 111997
2010-08-24 23:26:21 +00:00
Ted Kremenek
cc7f215872
USRs for class extensions should "mangle" in the location of the extension. (<rdar://problem/8350262>)
...
llvm-svn: 111991
2010-08-24 23:13:41 +00:00
Fariborz Jahanian
f4677b201e
Move the test for radar 8018252 to
...
SemaCXX/expressions.cpp.
llvm-svn: 111988
2010-08-24 22:55:33 +00:00
John McCall
24d189484b
When trying to resolve the address of an overloaded expression,
...
only form pointers-to-member if the expression has the appropriate
form. This avoids assertions later on on invalid code, but also
allows us to properly resolve mixed-staticity overloads.
llvm-svn: 111987
2010-08-24 22:52:39 +00:00
Sebastian Redl
401b39a736
AST writer support for having specializations of templates from earlier in the chain. This ought to finish C++ chained PCH support.
...
llvm-svn: 111986
2010-08-24 22:50:24 +00:00
Sebastian Redl
aba202b430
AST reader support for having specializations of templates from earlier in the chain.
...
llvm-svn: 111985
2010-08-24 22:50:19 +00:00
Douglas Gregor
b46e9bc26f
Remove i386 macro check from expected output of preprocessor
...
llvm-svn: 111984
2010-08-24 22:46:25 +00:00
Daniel Dunbar
d435275c59
Frontend: Add basic -H support.
...
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.
llvm-svn: 111983
2010-08-24 22:44:13 +00:00
Dale Johannesen
46742a4771
Add some missing X86-specific asm constraint letters, and fix
...
some bugs in setting allowsRegister on the ones there.
8348447.
llvm-svn: 111980
2010-08-24 22:33:12 +00:00
Chris Lattner
576048657e
correct the -isystem option to not add the -isysroot path. Only the weird
...
-iwithsysroot flag should do that. This fixes rdar://8345942
llvm-svn: 111979
2010-08-24 22:27:37 +00:00
Ted Kremenek
5f0c066062
Fix printf format string checking for '%lc' (which expects a wint_t or compatible argument). Fixes PR 7981.
...
llvm-svn: 111978
2010-08-24 22:24:51 +00:00
Fariborz Jahanian
e0fd5a9299
It is not error in c++ to take address of
...
register variable (c++03 7.1.1P3). radar 8108252.
llvm-svn: 111977
2010-08-24 22:21:48 +00:00
Douglas Gregor
ec00a26855
Implement code completion for preprocessor expressions and in macro
...
arguments.
llvm-svn: 111976
2010-08-24 22:20:20 +00:00