Douglas Gregor
dc72caa6de
When a type comes from a previously-loaded PCH/AST file, don't try to write it into a chained PCH file.
...
llvm-svn: 115527
2010-10-04 18:21:45 +00:00
Daniel Dunbar
25a3ada060
www: Add a "Clang Related Projects" page, to collect links to external projects
...
using Clang in one way or another. Additions welcome!
llvm-svn: 115508
2010-10-04 15:40:45 +00:00
Marcin Swiderski
87b1bb6fd2
Added support for C++ initializers in CFG.
...
llvm-svn: 115493
2010-10-04 03:38:22 +00:00
Chris Lattner
b9d4dfc86a
Change to match 115473.
...
llvm-svn: 115474
2010-10-03 19:09:22 +00:00
Bill Wendling
a76cdeb783
Do x86_64.
...
llvm-svn: 115460
2010-10-03 08:34:05 +00:00
Bill Wendling
4a58223401
Test to verify that all of the MMX builtins are handled by the front-end.
...
llvm-svn: 115459
2010-10-03 03:39:54 +00:00
Douglas Gregor
af25cfaae0
When providing a block literal as a code completion for a
...
function/method argument, include the parameter name and always
include parentheses (even for zero-parameter blocks). Otherwise, the
block literal placeholder '^' can look very weird.
llvm-svn: 115444
2010-10-02 23:49:58 +00:00
Douglas Gregor
97c7571ef3
Introduce a new libclang function, clang_getCursorDisplayName(), which
...
produces a simple "display" name that captures the
arguments/parameters for a function, function template, class
template, or class template specialization.
llvm-svn: 115428
2010-10-02 22:49:11 +00:00
Douglas Gregor
4e3918c06b
Teach clang_getCursorType() about base specifiers and other references
...
to types.
Also, teach clang_getTypeDeclaration() about template specializations,
injected-class-names, and elaborated types.
Fixes <rdar://problem/8506460>.
llvm-svn: 115425
2010-10-02 21:57:58 +00:00
Chris Lattner
07704f1d7e
the mmx intrinsic for pshufw should map to the IR intrinsic, not
...
to a shufflevector. Otherwise it doesn't turn into a pshufw.
This bug was introduced in the mmx rewrite.
llvm-svn: 115423
2010-10-02 21:32:59 +00:00
Douglas Gregor
3022037787
When we insert a category (or class extension) into an interface, mark
...
the interface as having changed since it was originally
serialized. This ensures that we see class extensions/categories in
chained PCH files.
llvm-svn: 115421
2010-10-02 21:06:43 +00:00
Douglas Gregor
db9fb5a427
Don't add -fno-spell-checking in libclang if a spell-checking-related argument is already in the command-line arguments
...
llvm-svn: 115420
2010-10-02 20:06:51 +00:00
Douglas Gregor
3478c75b71
Provide proper source location and range information for C++ base
...
specifier cursors in libclang. FIXME -=2, fixes the rest of
<rdar://problem/8274883>.
llvm-svn: 115419
2010-10-02 19:51:13 +00:00
Douglas Gregor
9109629e55
Implement chained PCH support for the macro definitions stored within
...
the "detailed" preprocessing record.
llvm-svn: 115417
2010-10-02 19:29:26 +00:00
Anders Carlsson
fe15a78ff2
Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.
...
llvm-svn: 115411
2010-10-02 17:45:21 +00:00
Anders Carlsson
0e523cba82
Rename a test in preparation for fixing PR8169.
...
llvm-svn: 115410
2010-10-02 17:08:38 +00:00
Chris Lattner
64d7f2a014
when expanding a builtin, if the argument is required to be a constant,
...
force it to be a constant instead of emitting with EmitScalarExpr. In
-ftrapv mode, they are not the same.
This fixes rdar://8478728 + PR8221
llvm-svn: 115388
2010-10-02 00:09:12 +00:00
Douglas Gregor
0eaa2bfe79
Don't add an imported function into its lexical context until *after*
...
we've set all of its parameters. Fixes <rdar://problem/8499598>;
thanks to Sean for the diagnosis.
llvm-svn: 115387
2010-10-01 23:55:07 +00:00
Chris Lattner
07e96866a2
tidy
...
llvm-svn: 115383
2010-10-01 23:43:16 +00:00
Chris Lattner
407e7e3ace
kill off CheckX86BuiltinFunctionCall
...
llvm-svn: 115382
2010-10-01 23:40:43 +00:00
Chris Lattner
04b03b1fc4
move imperative code to declarative definitions.
...
llvm-svn: 115381
2010-10-01 23:35:58 +00:00
Devang Patel
d18c5aa20a
Mark explict methods as explict in debug info.
...
llvm-svn: 115379
2010-10-01 23:32:17 +00:00
Chris Lattner
3be167f606
diagnose errors when a builtin that require constant arguments don't have them.
...
For example, on:
#include <emmintrin.h>
int foo(int N) {
__m128i white2;
white2 = _mm_slli_si128(white2, N);
return 0;
}
we used to get:
fatal error: error in backend: Cannot yet select: intrinsic %llvm.x86.sse2.psll.dq
now we get:
/Users/sabre/t.c:4:11: error: argument to '__builtin_ia32_pslldqi128' must be a
constant integer
white2 = _mm_slli_si128(white2, N);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/sabre/t.c:1:
/Volumes/Projects/cvs/llvm/Debug+Asserts/lib/clang/2.9/include/emmintrin.h:781:13: note: instantiated from:
((__m128i)__builtin_ia32_pslldqi128((__m128i)(VEC), (IMM)*8))
^ ~~~~~~~
1 error generated.
llvm-svn: 115374
2010-10-01 23:23:24 +00:00
Chris Lattner
bd6e69368f
enhance ASTContext::GetBuiltinType to return a bitmask indicating which arguments
...
are required to be ICE's. No clients of this new functionality yet!
llvm-svn: 115366
2010-10-01 22:53:11 +00:00
Chris Lattner
dc226c2b9b
random cleanups, no functionality change.
...
llvm-svn: 115361
2010-10-01 22:42:38 +00:00
Gabor Greif
594ce3573a
Doug's feedback
...
llvm-svn: 115356
2010-10-01 22:12:38 +00:00
Gabor Greif
16e028617c
Factor out enumerator APSInt adjustment into
...
a helper function (AdjustAPSInt) and use that
for adjusting the high bounds of case ranges
before APSInt comparisons. Fixes
http://llvm.org/bugs/show_bug.cgi?id=8135
Some minor refacorings while I am here.
llvm-svn: 115355
2010-10-01 22:05:14 +00:00
Fariborz Jahanian
de744dcce1
Restore test. Is for //rdar://8493239
...
llvm-svn: 115349
2010-10-01 21:26:26 +00:00
Francois Pichet
6d76e6cd92
Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit.
...
Example:
class A {
void A::foo(); //warning: extra qualification on member 'foo'
};
llvm-svn: 115347
2010-10-01 21:19:28 +00:00
Douglas Gregor
e6712983d2
Teach clang_getCursorReferenced() about Objective-C property reference
...
and protocol expressions. Fixes <rdar://problem/7833565>.
llvm-svn: 115346
2010-10-01 21:11:22 +00:00
Tom Care
7359459636
UnreachableCodeChecker does not need to inherit from CheckerVisitor, only Checker. It does not use any AST Stmt hooks, only VisitEndAnalysis.
...
llvm-svn: 115345
2010-10-01 20:52:07 +00:00
Douglas Gregor
36ea4d4f45
Revert r115336 ("Thread PerFileData through everything."), because
...
we're missing the corresponding changes in the LLVM repository.
llvm-svn: 115340
2010-10-01 20:33:34 +00:00
Douglas Gregor
99a26afd49
Extend libclang with an API that determines, given a C++ virtual
...
member function or an Objective-C method, which other member
functions/methods it overrides.
llvm-svn: 115338
2010-10-01 20:25:15 +00:00
Sebastian Redl
7b1b2268e2
Thread PerFileData through everything. This allows us to remap stuff later.
...
llvm-svn: 115336
2010-10-01 19:59:15 +00:00
Sebastian Redl
3f6b753f9d
Record module loaders and module source order.
...
llvm-svn: 115334
2010-10-01 19:59:12 +00:00
Chris Lattner
2d084d07c8
fix a bogus "I" that I added to the per-function attribute list.
...
llvm-svn: 115333
2010-10-01 19:47:04 +00:00
Douglas Gregor
7fb25418ed
Implement the C++0x "trailing return type" feature, e.g.,
...
auto f(int) -> int
from Daniel Wallin!
(With a few minor bug fixes from me).
llvm-svn: 115322
2010-10-01 18:44:50 +00:00
Chris Lattner
8473339100
Various builtins a require an integer constant. Not providing
...
one results in an obscure error from the backend that doesn't make
sense. Capture this information in the .def files for builtins with
a new "I" modifier letter indicating the an argument needs to be an ICE.
Nothing uses this yet, but sema will eventually enforce this (eliminating
some special cases from semachecking.cpp) and codegen will use this to
force an ICE value, preventing backend error messages.
llvm-svn: 115302
2010-10-01 07:13:18 +00:00
Chris Lattner
1750cb037d
__builtin_ia32_psrldqi128 too
...
llvm-svn: 115301
2010-10-01 06:58:49 +00:00
Chris Lattner
81f347fe6d
the second argument to __builtin_ia32_pslldqi128 must be an immediate,
...
so it needs to be called from a macro, not a function. This is a necessary
but insufficient step towards fixing PR8221
llvm-svn: 115299
2010-10-01 06:52:23 +00:00
Zhongxing Xu
b06a2cdd2b
Now the whether adding implicit dtors is controlled by cmd option.
...
llvm-svn: 115275
2010-10-01 03:31:06 +00:00
Zhongxing Xu
6d372f7c0f
The return value is never used.
...
llvm-svn: 115272
2010-10-01 03:22:39 +00:00
Zhongxing Xu
307701e1b4
Use default augument.
...
llvm-svn: 115271
2010-10-01 03:09:09 +00:00
Zhongxing Xu
81714f2196
Simplify interface for addLocalScopeForStmt().
...
llvm-svn: 115270
2010-10-01 03:00:16 +00:00
Zhongxing Xu
ea360a3b1a
The old logic would add non-struct and non C++ struct variables to the local
...
scope. Now we only add C++ struct with non-trivial destructor variables to the
local scope.
llvm-svn: 115269
2010-10-01 02:47:11 +00:00
Marcin Swiderski
3546b1aea1
Added generating CFGAutomaticObjDtors for exception variable in catch statement.
...
llvm-svn: 115266
2010-10-01 01:46:52 +00:00
Marcin Swiderski
6d5ee0c7f9
Added generating CFGAutomaticObjDtors for init statement, condition variable and implicit scope in for statement.
...
llvm-svn: 115265
2010-10-01 01:38:14 +00:00
Marcin Swiderski
e407a3ba1e
dded generating CFGAutomaticObjDtors for condition variable and implicit scopes in switch statement.
...
llvm-svn: 115264
2010-10-01 01:24:41 +00:00
Douglas Gregor
aa43301842
If we get a TU_CONTEXT update from a chained PCH file before we
...
actually have an ASTContext, delay the processing of that
update. Patch by Sebastian Redl! Fixes <rdar://problem/8499034>.
llvm-svn: 115263
2010-10-01 01:18:02 +00:00
Marcin Swiderski
1f4e15c56f
Added generating CFGAutomaticObjDtors for condition variable and implicit scopes in while and do statements.
...
llvm-svn: 115262
2010-10-01 01:14:17 +00:00