Nick Lewycky
d54e2aba6c
PrintFunctionNames is a plugin, it should pull in symbols from the clang binary
...
that loads it, not by linking against them directly.
llvm-svn: 108055
2010-07-10 20:24:23 +00:00
Nick Lewycky
32a168c5f8
Clang do so have plugins, we can't prune exports. Fixes plugin support.
...
llvm-svn: 108054
2010-07-10 20:19:47 +00:00
Dale Johannesen
bde8ee26d0
Fix compile error. Per Fariborz.
...
llvm-svn: 108051
2010-07-10 19:53:56 +00:00
Chandler Carruth
17773fcd83
Lay the ground work for resoving PR7047. This doesn't actually fix it because
...
default arguments to template parameters don't have a DeclContext when
instantiated, and so we can't detect that we're in an instantiation context as
opposed to the definition context. However, it fixes the more commonly-occuring
cases in TMP code that use devolve to this type of tautology after
substitution.
llvm-svn: 108044
2010-07-10 12:30:03 +00:00
Argyrios Kyrtzidis
b8d77eb300
Add PCH support for the remaining C++ exprs.
...
llvm-svn: 108042
2010-07-10 11:46:15 +00:00
Peter Collingbourne
9701743b1a
Fix CMake build
...
llvm-svn: 108031
2010-07-09 23:06:34 +00:00
John Thompson
c438947242
Hack for dealing with commas until we support multiple alternative constraints, per pr7338.
...
llvm-svn: 108028
2010-07-09 22:49:34 +00:00
Fariborz Jahanian
4239aa104b
BlockDeclRefExpr of a dependent type must
...
be a dependent expression when its is built.
llvm-svn: 108026
2010-07-09 22:21:32 +00:00
Fariborz Jahanian
2f8bd36bcf
Instantiation of byref variable in
...
block literal expression.
llvm-svn: 108019
2010-07-09 21:27:28 +00:00
Sebastian Redl
3e39272fed
Slightly improve the diagnostic when using a qualified function typedef to declare nonmember or static member functions.
...
llvm-svn: 108018
2010-07-09 21:26:08 +00:00
Argyrios Kyrtzidis
8704057ce9
Reorganize how ClassTemplate[Partial]SpecializationDecls are read/written to avoid the
...
possibility of adding an unitialized one into the folding set.
llvm-svn: 108016
2010-07-09 21:11:43 +00:00
Argyrios Kyrtzidis
dd2061b2cd
isMemberSpecialization -> setMemberSpecialization.
...
llvm-svn: 108015
2010-07-09 21:11:35 +00:00
Sebastian Redl
4d3af3e192
When given the -chained-pch option and a previous PCH file, have the PCHWriter emit a CHAINED_METADATA record instead of METADATA, and write a link to the previous file there.
...
llvm-svn: 108014
2010-07-09 21:00:24 +00:00
Craig Silverstein
4a5d086b50
Fix a crashing but trying to print a TemplateTemplateParmDecl
...
for code like this:
template<template<typename T> class U> class V {};
The problem is that the DeclPrinter assumed all TemplateDecls
have a getTemplatedClass(), but template template params don't
(so we got a NULL dereference). The solution is to detect if
we're a template template param, and construct the template
class name ('class U') specially in this case.
OKed by dgregor and chandlerc
llvm-svn: 108007
2010-07-09 20:25:10 +00:00
Eli Friedman
d8c60e34da
Ignore -Wno-main, per PR7269.
...
llvm-svn: 108006
2010-07-09 20:03:13 +00:00
Chandler Carruth
0b73ccfe20
Rip out the floating point return type handling from the atomic builtin. It's
...
wrong, and we don't handle floating point value type arguments yet anyways.
Will add correct logic for both when I finish the patch.
llvm-svn: 108004
2010-07-09 19:19:40 +00:00
Chandler Carruth
741e5cea77
Fix PR7600, and correctly convert the result of an atomic builtin to the
...
expected value type. This is necessary as the builtin is internally represented
as only operating on integral types.
Also, add a FIXME to add support for floating point value types.
llvm-svn: 108002
2010-07-09 18:59:35 +00:00
Fariborz Jahanian
1babe7778d
Instantiation of block literal expressions. wip.
...
llvm-svn: 108000
2010-07-09 18:44:02 +00:00
Douglas Gregor
79edde88ed
Document my otherwise-inexplicable change
...
llvm-svn: 107998
2010-07-09 18:39:07 +00:00
Douglas Gregor
8014df4c21
Refer to implicit "conversions" rather than implicit "casts", which
...
don't technically exist in the language. <rdar://problem/8085982>
llvm-svn: 107995
2010-07-09 18:18:35 +00:00
Sebastian Redl
60876431b1
Correctly initialize Reader to null.
...
llvm-svn: 107994
2010-07-09 17:53:32 +00:00
Sebastian Redl
f525a30d19
Really respect -chained-pch.
...
llvm-svn: 107993
2010-07-09 17:40:12 +00:00
Douglas Gregor
8ed0c0b99d
Introduce -f{no-}spell-checking options to enable/disable
...
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.
llvm-svn: 107992
2010-07-09 17:35:33 +00:00
Douglas Gregor
137b27da2e
Document -f{no-}color-diagnostics
...
llvm-svn: 107985
2010-07-09 16:31:58 +00:00
Craig Silverstein
60f8b286ad
Move traverseunqualifiedtypeloc over to the 'main' typeloc tree.
...
Note that this is a move -- we pretend that we were really looking
at the unqualified typeloc all along -- rather than a recursion, so
we don't follow the normal CRTP plan of going through
getDerived().TraverseTypeLoc. If we did, we'd be traversing twice
for the same type (once as a QualifiedTypeLoc version of the type,
once as an UnqualifiedTypeLoc version of the type), which in effect
means we'd call VisitTypeLoc twice with the 'same' type. This
solves that problem, at the cost of never seeing the qualified
version of the type (unless the client subclasses
TraverseQualifiedTypeLoc themselves). It's not a perfect solution.
A perfect solution probably requires making QualifiedTypeLoc a
wrapper around TypeLoc -- like QualType is a wrapper around Type*
-- rather than being its own class in the type hierarchy.
Reviewed by wan.
llvm-svn: 107973
2010-07-09 15:19:34 +00:00
John Thompson
ab71ead011
Revert 107953, remove comma ignoring from PPC constraints.
...
llvm-svn: 107956
2010-07-09 04:53:08 +00:00
John Thompson
7099f0c0d5
Updating PPC target to ignore commas in asm contrains, as apparently that is what gcc does.
...
llvm-svn: 107953
2010-07-09 02:01:40 +00:00
Sebastian Redl
f4b0c4b946
Add a frontend option -chained-pch and don't pass an active PCH reader to the PCH writer if it is not set, preventing creation of chained PCH files. Since the reader is so far unused, effectively no functionality change.
...
llvm-svn: 107936
2010-07-09 00:00:58 +00:00
Jordy Rose
d5d2e50f3e
Cleanup in CStringChecker. Now properly bifurcates the state for zero/nonzero sizes.
...
llvm-svn: 107935
2010-07-08 23:57:29 +00:00
Douglas Gregor
4587969555
Support code completion for parameter names in Objective-C method
...
declarations.
llvm-svn: 107933
2010-07-08 23:37:41 +00:00
Douglas Gregor
95887f9c5b
Introduce a new code-completion point prior to an identifier in the
...
selector of an Objective-C method declaration, e.g., given
- (int)first:(int)x second:(int)y;
this code completion point triggers at the location of "second". It
will provide completions that fill out the method declaration for any
known method, anywhere in the translation unit.
llvm-svn: 107929
2010-07-08 23:20:03 +00:00
Sebastian Redl
caef9ab03c
When looking for an entity's Scope, don't consider scopes that can't contain declarations. Fixes PR7594.
...
llvm-svn: 107927
2010-07-08 23:07:34 +00:00
Sebastian Redl
595c51342c
Some preparatory work for chained PCH. No functionality change.
...
llvm-svn: 107915
2010-07-08 22:01:51 +00:00
Zhanyong Wan
9870460c84
Makes RecursiveASTVisitor traverse the type of a temporary object
...
created via T() where T is a class type. Reviewed by chandlerc and
csilvers.
llvm-svn: 107911
2010-07-08 21:01:29 +00:00
Douglas Gregor
55b037b9f3
During code completion, give the "nil" and "NULL" macros the same
...
priority as other constants. And, if we're in a place where we prefer
a pointer type, consider "nil" and "NULL" to be close matches.
llvm-svn: 107910
2010-07-08 20:55:51 +00:00
Douglas Gregor
eaff2cbbab
Allow C-style casts and reinterpret_casts between block pointers and
...
either integer values or other pointers. Fixes <rdar://problem/8134521>.
llvm-svn: 107905
2010-07-08 20:27:32 +00:00
Eli Friedman
07c89c6b3e
PR7588: Fix the _mm_shufflehi_epi16 macro. (The issue was an oversight
...
involving operator precedence.)
llvm-svn: 107902
2010-07-08 20:09:45 +00:00
Devang Patel
8f3f76f991
Handle forward declarations properly in debug info.
...
Patch by Alexander Kabaev.
PR 7595.
llvm-svn: 107900
2010-07-08 19:56:29 +00:00
Ted Kremenek
3245003251
Add missing whitespace.
...
llvm-svn: 107897
2010-07-08 19:43:08 +00:00
Douglas Gregor
9961ce9428
When performing substitution of template arguments within the body of
...
a template, be sure to include the template arguments from the
injected-class-name. Fixes PR7587.
llvm-svn: 107895
2010-07-08 18:37:38 +00:00
Ted Kremenek
30ae68bd17
Update checker build.
...
llvm-svn: 107893
2010-07-08 18:08:18 +00:00
Argyrios Kyrtzidis
7e8996c7e6
Introduce PCHReader::GetTranslationUnitDecl() and use it instead of ReadDeclRecord when initializing.
...
ReadDeclRecord would hit assertion if the translation unit declaration was already loaded during
IdentifierInfo initialization.
llvm-svn: 107885
2010-07-08 17:13:02 +00:00
Argyrios Kyrtzidis
9f2d24a808
Support TemplateTemplateParmDecl for PCH.
...
llvm-svn: 107884
2010-07-08 17:12:57 +00:00
Douglas Gregor
f609386058
Bowing to popular demand, reduce the "comma at end of enumerator list"
...
ExtWarn to an Extension. Let the broken code propagate!
llvm-svn: 107875
2010-07-08 14:54:42 +00:00
John McCall
b5081aff68
Apparently the {{$}} hack doesn't work on Windows; I am saddened but not
...
surprised.
llvm-svn: 107874
2010-07-08 13:17:29 +00:00
Argyrios Kyrtzidis
a4ed18191c
For TagType and TemplateSpecializationType, isDependent calculation may be invalid because some decls that the
...
calculation is using may still be initializing.
Thus, store the isDependent flag to PCH and restore directly to Type.
llvm-svn: 107873
2010-07-08 13:09:53 +00:00
Argyrios Kyrtzidis
1985bb3b10
Read/write the C++ parts of DeclRefExpr and MemberExpr for PCH.
...
llvm-svn: 107872
2010-07-08 13:09:47 +00:00
Argyrios Kyrtzidis
00dda6accc
Fix reading of UsingDecl from PCH.
...
llvm-svn: 107871
2010-07-08 13:09:41 +00:00
Argyrios Kyrtzidis
ab446e1b57
Remove unused protected constructor of DeclRefExpr.
...
llvm-svn: 107870
2010-07-08 13:09:35 +00:00
Chandler Carruth
e51a119fc6
Wrap the new ext-warn on extraneous comma on the last entry of an enumerator
...
list in a diagnostic group so it can be turned on and off. A terrifying amount
of code, including large chunks of open source code, still do this so it's
important to be able to suppress it when necessary.
Doug, is this a reasonable compromise? I'd lean toward making it a normal
extension, but I don't feel strongly as long as we can turn the warnings off.
llvm-svn: 107865
2010-07-08 10:52:01 +00:00