]>
granicus.if.org Git - clang/log
Douglas Gregor [Mon, 4 Jan 2010 19:45:17 +0000 (19:45 +0000)]
Turn on code-completion for macros within CIndex
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 4 Jan 2010 19:18:44 +0000 (19:18 +0000)]
Teach Preprocessor::macro_begin/macro_end to lazily load all macro
definitions from a precompiled header. This ensures that
code-completion with macro names behaves the same with or without
precompiled headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 4 Jan 2010 18:47:06 +0000 (18:47 +0000)]
Revert r92431, this code isn't dead and broke the ntfs build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 4 Jan 2010 18:02:28 +0000 (18:02 +0000)]
Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 4 Jan 2010 17:27:12 +0000 (17:27 +0000)]
When declaring an Objective-C implementation without a corresponding
interface, suggest correction of typos. For example, given:
@interface NSString
@end
@implementation NSstring
@end
we'll warn with:
t.m:4:19: warning: cannot find interface declaration for 'NSstring';
did you mean 'NSString'?
@implementation NSstring
^
However, since this is just a warning, we don't provide a fix-it
hint. Good idea, Ted!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 3 Jan 2010 18:18:37 +0000 (18:18 +0000)]
__builtin_object_size(ptr, type) returns -1 for type = {0,1} if there are any side-effects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 3 Jan 2010 18:01:57 +0000 (18:01 +0000)]
Implement typo correction for a variety of Objective-C-specific
constructs:
- Instance variable lookup ("foo->ivar" and, in instance methods, "ivar")
- Property name lookup ("foo.prop")
- Superclasses
- Various places where a class name is required
- Protocol names (e.g., id<proto>)
This seems to cover many of the common places where typos could occur.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 3 Jan 2010 02:01:11 +0000 (02:01 +0000)]
Better coverage for -dump-record-layouts and -print-decl-contexts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 3 Jan 2010 01:20:41 +0000 (01:20 +0000)]
Improve coverage for test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 3 Jan 2010 01:11:47 +0000 (01:11 +0000)]
Get rid of more dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 3 Jan 2010 00:51:58 +0000 (00:51 +0000)]
Add test for annotate attribute for coverage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 3 Jan 2010 00:20:48 +0000 (00:20 +0000)]
Fix minor oversight for increment/decrement of complex int. Add tests for
coverage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Jan 2010 23:43:59 +0000 (23:43 +0000)]
Get rid of some unnecessary code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Jan 2010 23:28:56 +0000 (23:28 +0000)]
Delete impossible case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Jan 2010 23:21:40 +0000 (23:21 +0000)]
Add a couple more tests for coverage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Jan 2010 22:56:07 +0000 (22:56 +0000)]
Get rid of more unnecessary code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Jan 2010 22:43:56 +0000 (22:43 +0000)]
Get rid of some unnecessary code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 2 Jan 2010 21:44:36 +0000 (21:44 +0000)]
Eliminate dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 2 Jan 2010 18:46:23 +0000 (18:46 +0000)]
Speculative MSVC fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92421
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 2 Jan 2010 18:02:32 +0000 (18:02 +0000)]
Move address points to CGVtableInfo, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 2 Jan 2010 01:01:18 +0000 (01:01 +0000)]
Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Jan 2010 20:29:01 +0000 (20:29 +0000)]
Move a few more functions away from CGCXX and to CGClass and CGExprCXX.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 1 Jan 2010 17:44:25 +0000 (17:44 +0000)]
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 1 Jan 2010 17:23:17 +0000 (17:23 +0000)]
Fix typo test RUN lines
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 1 Jan 2010 03:20:32 +0000 (03:20 +0000)]
Fix last patch, catch of reference to non-pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 1 Jan 2010 02:51:52 +0000 (02:51 +0000)]
Fix catching a reference to a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 1 Jan 2010 00:15:04 +0000 (00:15 +0000)]
When typo correction for an id-expression finds a type (or Objective-C
class), provide a suggestion for the type or class found. However,
since we can't recover properly in this case, don't provide a fix-it
hint. Example:
test/FixIt/typo.m:8:3: error: use of undeclared identifier 'NSstring';
did you
mean 'NSString'?
NSstring *str = @"A string";
...
^
1 diagnostic generated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 1 Jan 2010 00:03:05 +0000 (00:03 +0000)]
Typo correction for C99 designated field initializers, e.g.,
test/FixIt/typo.c:19:4: error: field designator 'bunds' does not refer to any
field in type 'struct Window'; did you mean 'bounds'?
.bunds.
^~~~~
bounds
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92376
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 31 Dec 2009 19:36:25 +0000 (19:36 +0000)]
If the key function of a record is inline, then the RTTI data should have weak_odr linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92371
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 31 Dec 2009 18:54:35 +0000 (18:54 +0000)]
It's OK for a return type to be incomplete if it's being defined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92367
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 31 Dec 2009 18:34:24 +0000 (18:34 +0000)]
Make sure that an overriding return type is complete before checking if it's covariant. Fixes PR5920.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 31 Dec 2009 17:44:32 +0000 (17:44 +0000)]
Remove rtti.cpp, it's very fragile and has been marked XFAIL for a while now. Between rtti-layout.cpp and rtti-linkage.cpp, RTTI testing should be covered.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 31 Dec 2009 17:43:53 +0000 (17:43 +0000)]
More RTTI builder cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92360
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Dec 2009 15:33:09 +0000 (15:33 +0000)]
Avoid an unnecessary copy of Predefines. getMemBufferCopy does the null termination for us.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 31 Dec 2009 13:32:38 +0000 (13:32 +0000)]
Convert to StringRef, avoid a memcpy in the common case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 31 Dec 2009 09:10:24 +0000 (09:10 +0000)]
Typo correction for C++ base and member initializers, e.g.,
test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static
data member or base class; did you mean the base class 'Base'?
Derived() : base(),
^~~~
Base
test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static
data member or base class; did you mean the member 'member'?
ember() { }
^~~~~
member
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 31 Dec 2009 08:27:32 +0000 (08:27 +0000)]
Add another typo test for nested-name-specifiers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 31 Dec 2009 08:26:35 +0000 (08:26 +0000)]
Typo correction for identifiers within nested name specifiers, e.g.,
typo.cpp:18:1: error: use of undeclared identifier 'other_std'; did
you mean 'otherstd'?
other_std::strng str1;
^~~~~~~~~
otherstd
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 31 Dec 2009 08:11:17 +0000 (08:11 +0000)]
Typo correction for template names, e.g.,
typo.cpp:27:8: error: no template named 'basic_sting' in namespace 'std';
did you mean 'basic_string'?
std::basic_sting<char> b2;
~~~~~^~~~~~~~~~~
basic_string
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92348
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 31 Dec 2009 07:42:17 +0000 (07:42 +0000)]
Typo correction for member access into classes/structs/unions, e.g.,
s.fnd("hello")
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 31 Dec 2009 06:13:07 +0000 (06:13 +0000)]
Let constraint manager inform checkers that some assumption logic has happend.
Add new states for symbolic regions tracked by malloc checker. This enables us
to do malloc checking more accurately. See test case.
Based on Lei Zhang's patch and discussion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92342
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 31 Dec 2009 05:20:13 +0000 (05:20 +0000)]
Implement typo correction for id-expressions, e.g.,
typo.cpp:22:10: error: use of undeclared identifier 'radious'; did
you mean 'radius'?
return radious * pi;
^~~~~~~
radius
This was super-easy, since we already had decent recovery by looking
for names in dependent base classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 31 Dec 2009 03:10:55 +0000 (03:10 +0000)]
improve diagnostics for case when a field type is unknown by
not emitting a follow-on error about 'int', which the user
never wrote. PR5924.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 30 Dec 2009 23:47:56 +0000 (23:47 +0000)]
Fix a bunch of bugs with VMI RTTI building, and add a whole bunch of tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92319
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 30 Dec 2009 22:59:54 +0000 (22:59 +0000)]
The element type should also be canonicalized. Add a case for VariableArrayType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Dec 2009 22:10:22 +0000 (22:10 +0000)]
testcase for previous patch!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92317
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Dec 2009 22:06:22 +0000 (22:06 +0000)]
when making a decl for __builtin_fabsf() make sure to
attach the appropriate attributes to it. I don't think
this manifests as any real change though, we're still
not getting the right LLVM IR attributes out of codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 30 Dec 2009 21:24:23 +0000 (21:24 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Dec 2009 21:19:39 +0000 (21:19 +0000)]
fix PR5917, L'x' was getting the wrong type in c++ mode. Per
C++2.13.2p2: "A wide-character literal has type wchar_t"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Dec 2009 20:38:08 +0000 (20:38 +0000)]
When rewriting a __block declaration, use a suitable API to get location of
the declaration in the presence of an initializer macro.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92312
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Dec 2009 19:54:10 +0000 (19:54 +0000)]
remove extraneous #include
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 30 Dec 2009 17:04:44 +0000 (17:04 +0000)]
Typo correction for type names when they appear in declarations, e.g., given
tring str2;
we produce the following diagnostic + fix-it:
typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'?
tring str2;
^~~~~
string
To make this really useful, we'll need to introduce typo correction in
many more places (wherever we do name lookup), and implement
declaration-vs-expression heuristics that cope with typos
better. However, for now this will handle the simple cases where we
already get good "unknown type name" diagnostics.
The LookupVisibleDecls functions are intended to be used by code
completion as well as typo correction; that refactoring will happen
later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 30 Dec 2009 16:01:52 +0000 (16:01 +0000)]
Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 30 Dec 2009 06:48:20 +0000 (06:48 +0000)]
Remove an duplicated #include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 30 Dec 2009 06:38:20 +0000 (06:38 +0000)]
Simplify code by using an equivalent template class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 30 Dec 2009 04:10:01 +0000 (04:10 +0000)]
More fixes to the handling of CVR-comparisons on array types. Adds a method to
QualType to get CVR-qualifiers through array types, and switches the primary
comparison methods to use it. This may allow simplifying some of the callers of
getUnqualifiedArrayType.
Also fix the normalizing of CV-qualification during template deduction to
normalize through arrays and allow a more qualified deduced array type. This
fixes PR5911.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92289
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 30 Dec 2009 01:29:05 +0000 (01:29 +0000)]
Add base class checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92286
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 30 Dec 2009 01:25:42 +0000 (01:25 +0000)]
Add more vtable tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92285
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 30 Dec 2009 01:00:12 +0000 (01:00 +0000)]
More RTTI cleanup, test that RTTI classes have the correct vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92284
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 30 Dec 2009 00:31:22 +0000 (00:31 +0000)]
Typedefs can be redeclared. That seems like something we should record in
the AST lest we run into some crazy canonicalization bug like PR5874.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Dec 2009 00:20:14 +0000 (00:20 +0000)]
Test for PR5908.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92282
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Dec 2009 00:13:48 +0000 (00:13 +0000)]
Make sure to explicitly pass type/value dependence to Expr constructor. This
caught several cases where we were not doing the right thing. I'm
not completely sure all cases are being handled correctly, but this should
be an improvement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Dec 2009 22:30:11 +0000 (22:30 +0000)]
Match gcc and treat vector types as fundamental types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92278
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Dec 2009 22:13:01 +0000 (22:13 +0000)]
Handle enum types as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Dec 2009 21:58:32 +0000 (21:58 +0000)]
Test linkage of RTTI descriptors of array types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Dec 2009 20:20:19 +0000 (20:20 +0000)]
Fix function type RTTI linkage and add tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92266
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 29 Dec 2009 08:05:19 +0000 (08:05 +0000)]
Fix support for const_cast<>s of array types which actual change the
CV-qualifiers. Remove an error expectation from the 'good' set of const-cast
test cases. With this patch, the final non-template test case from PR5542
passes. (It's the same as the one already in const-cast.cpp.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Dec 2009 07:49:13 +0000 (07:49 +0000)]
strength reduce this call away.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Dec 2009 07:42:23 +0000 (07:42 +0000)]
fix whitespace in test to match llvm asmprinter change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 29 Dec 2009 07:16:59 +0000 (07:16 +0000)]
Correctly refer to element CVR qualifications when determining if a type is
more or less cv-qualified than another during implicit conversion and overload
resolution ([basic.type.qualifier] p5). Factors the logic out of template
deduction and into the ASTContext so it can be shared.
This fixes several aspects of PR5542, but not all of them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92248
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Dec 2009 07:07:36 +0000 (07:07 +0000)]
Get rid of FixedWidthIntType, as suggested by Chris and Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 29 Dec 2009 06:17:27 +0000 (06:17 +0000)]
Handle using declarations in overloaded and template functions during ADL and
address resolution. This fixes PR5751.
Also, while we're here, remove logic from ADL which mistakenly included the
definition namespaces of overloaded and/or templated functions whose name or
address is used as an argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Dec 2009 23:41:39 +0000 (23:41 +0000)]
adjust for llvm api changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Dec 2009 21:44:41 +0000 (21:44 +0000)]
this form of SetDebugLocation is about to go away, add some #includes that
are about to not come in implicitly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92228
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 28 Dec 2009 06:52:51 +0000 (06:52 +0000)]
Adjust indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 28 Dec 2009 06:49:22 +0000 (06:49 +0000)]
Fix 80-col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Dec 2009 06:36:46 +0000 (06:36 +0000)]
use best-fit instead of first-fit when reusing a MacroArgs object,
this speeds up Eonly on the testcase in PR5888 from 30.5s to 0.85s
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92203
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Dec 2009 06:17:16 +0000 (06:17 +0000)]
The PreExpArgTokens array is indexed with an argument #,
not a token number. Fix the reserve logic to get the right
amount of space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92202
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Weinig [Mon, 28 Dec 2009 03:19:38 +0000 (03:19 +0000)]
Fix for PR5871. Make __PRETTY_FUNCTION__ work for member functions defined in a class local to a function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 27 Dec 2009 22:31:18 +0000 (22:31 +0000)]
Make sure to give an error for template argument lists followed by junk.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 27 Dec 2009 14:27:22 +0000 (14:27 +0000)]
Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.
This is needed for the platforms, where bitwidth of "int" is not 32 bits
(e.g. 16 on msp430).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 27 Dec 2009 07:02:50 +0000 (07:02 +0000)]
Add a sanity assertion so that we don't silently generate bad code; I'll file
a bug with a testcase hitting this assertion in a moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 27 Dec 2009 05:59:41 +0000 (05:59 +0000)]
Fix runline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 27 Dec 2009 05:43:15 +0000 (05:43 +0000)]
Fix PointerExprEvaluator::VisitCastExpr so it doesn't misfold C++ casts which
it doesn't know how to fold, like derived-to-base casts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 27 Dec 2009 03:44:17 +0000 (03:44 +0000)]
Fix obvious mistake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Weinig [Sun, 27 Dec 2009 01:38:20 +0000 (01:38 +0000)]
Fix for PR5872. Add static specifier and const/volatile qualifiers to member functions in __PRETTY_FUNCTION__ predefined expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92171
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 26 Dec 2009 22:58:48 +0000 (22:58 +0000)]
Tests: Tweak LLVM-Code-Symbols test to ignore common and undefined symbols for
now, let's start small.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 26 Dec 2009 03:35:45 +0000 (03:35 +0000)]
Don't look through casts when looking for the underlying decl for a function
call; the standard doesn't expect us to, and the program could be doing
something crazy. Fixes PR5882.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 25 Dec 2009 23:59:21 +0000 (23:59 +0000)]
Attempted fix for PR5884; this code will be dead soon, but this fix should
help for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Dec 2009 20:21:23 +0000 (20:21 +0000)]
Driver: Use "g++" as generic gcc name when running in C++ mode, for platforms
that lack real tool definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92164
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Dec 2009 17:06:27 +0000 (17:06 +0000)]
Make sure operator new[] and operator delete[] match. This will hopefully silence 3 remaining MSVC warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Dec 2009 15:43:36 +0000 (15:43 +0000)]
Remove some dead variables clang-analyzer found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Dec 2009 09:44:02 +0000 (09:44 +0000)]
Fix typo spotted by MSVC.
GRExprEngine.cpp(1348) : warning C4305: 'argument' : truncation from 'clang::ProgramPoint::Kind' to 'bool'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 25 Dec 2009 06:17:05 +0000 (06:17 +0000)]
Minor optimization; emit proper unsupported messages for a couple of cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 25 Dec 2009 05:29:40 +0000 (05:29 +0000)]
Some small improvements to dead code elimination; helps a bit on
LLVM-Code-Symbols test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 24 Dec 2009 23:33:34 +0000 (23:33 +0000)]
Make copy constructor elimination work in more cases; the case in question
here affects clang-on-clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sam Weinig [Thu, 24 Dec 2009 23:15:03 +0000 (23:15 +0000)]
Fix for PR5844. Be explicit about anonymous struct/class/union/namespaces in __PRETTY_FUNCTION__ predefined expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 24 Dec 2009 22:46:43 +0000 (22:46 +0000)]
Move a bunch of class related functions to CGClass.cpp, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 24 Dec 2009 21:27:38 +0000 (21:27 +0000)]
Sketch a simple new C++Tests suite for checking that llvm-gcc and clang generate
the same visible symbols, useful for finding ABI/Mangler/vtable/etc. issues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92147
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 24 Dec 2009 21:13:40 +0000 (21:13 +0000)]
Pass the return value slot to all call exprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92145
91177308 -0d34-0410-b5e6-
96231b3b80d8