Douglas Gregor
0098499f7d
Downgrade the error about rvalue references to an extension warning
...
and turn on __has_feature(cxx_rvalue_references). The core rvalue
references proposal seems to be fully implemented now, pending lots
more testing.
llvm-svn: 124169
2011-01-25 02:17:32 +00:00
Anders Carlsson
19588aa40b
Get rid of the [[final]] C++0x attribute.
...
llvm-svn: 124083
2011-01-23 21:07:30 +00:00
John McCall
0140bfeead
Improve our parse recovery on 'case blah;' and 'default;'.
...
llvm-svn: 124025
2011-01-22 09:28:32 +00:00
Anders Carlsson
b4801436d1
Fix tests to be valid.
...
llvm-svn: 123887
2011-01-20 05:55:43 +00:00
Anders Carlsson
511315cc55
Add silly test case.
...
llvm-svn: 123880
2011-01-20 04:07:46 +00:00
Anders Carlsson
d802266c6b
Add more parser tests for the override control keywords.
...
llvm-svn: 123875
2011-01-20 03:41:12 +00:00
Douglas Gregor
8a4db83041
Parse the optional semicolon after a C++ in-class member function
...
definition, rather than complaining about it. Problem reported by
Marshall Clow.
llvm-svn: 123835
2011-01-19 16:41:58 +00:00
Francois Pichet
6422579411
Add support for explicit constructor calls in Microsoft mode.
...
For example:
class A{
public:
A& operator=(const A& that) {
if (this != &that) {
this->A::~A();
this->A::A(that); // <=== explicit constructor call.
}
return *this;
}
};
More work will be needed to support an explicit call to a template constructor.
llvm-svn: 123735
2011-01-18 05:04:39 +00:00
Anders Carlsson
11fdbbc1ad
Begin work on supporting "N3206: Override control: Eliminating Attributes", from
...
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm
This lands support for parsing virt-specifier-seq after member functions, including the
contextual keywords 'final', and 'override'. The keywords are not yet used for anything.
llvm-svn: 123606
2011-01-16 23:56:42 +00:00
Douglas Gregor
94a32477fd
When we're inside a functional cast, '>' is an operator. Fixes PR8912.
...
llvm-svn: 123201
2011-01-11 00:33:19 +00:00
Douglas Gregor
78edf99f46
Use Parser::ExpectAndConsume() uniformly to eat semicolons after
...
Objective-C declarations and statements. Fixes
<rdar://problem/8814576> (wrong source line for diagnostics about
missing ';'), and now we actually consume the ';' at the end of a
@compatibility_alias directive!
llvm-svn: 122855
2011-01-05 01:10:06 +00:00
Francois Pichet
b7577657cd
More __uuidof validation:
...
1. Do not validate for uuid attribute if the type is template dependent.
2. Search every class declaration and definition for the uuid attribute.
llvm-svn: 122578
2010-12-27 01:32:00 +00:00
Douglas Gregor
0d0a965b62
Improve the diagnostic and recovery for missing colons after 'case'
...
and 'default' statements, including a Fix-It to add the colon:
test/Parser/switch-recovery.cpp:13:12: error: expected ':' after 'case'
case 17 // expected-error{{expected ':' after 'case'}}
^
:
test/Parser/switch-recovery.cpp:16:12: error: expected ':' after 'default'
default // expected-error{{expected ':' after 'default'}}
^
:
llvm-svn: 122522
2010-12-23 22:56:40 +00:00
Francois Pichet
9dddd40a1c
Emit an error if operator __uuidof() is called on a type with no associated GUID.
...
llvm-svn: 122226
2010-12-20 03:51:03 +00:00
Francois Pichet
7da1166da0
Validate Microsoft's uuid attribute string.
...
llvm-svn: 122220
2010-12-20 01:41:49 +00:00
Francois Pichet
4f64c5aa70
Microsoft's __uuidof operator returns a lvalue.
...
llvm-svn: 122021
2010-12-17 02:00:06 +00:00
Douglas Gregor
3a001f48e4
When parsing something that looks like an ill-formed
...
protocol-qualifier list without a leading type (e.g., <#blah#>), don't
complain about it being an archaic protocol-qualifier list unless it
actually parses as one.
llvm-svn: 119805
2010-11-19 17:10:50 +00:00
Anton Yartsev
3f8f2886c1
comparison of AltiVec vectors now gives bool result (fix for 7533)
...
llvm-svn: 119678
2010-11-18 03:19:30 +00:00
Argyrios Kyrtzidis
20ee5ae871
Emit a specific diagnostic when typedefing C++ bool, mirroring gcc.
...
Fixes rdar://8365458
llvm-svn: 119359
2010-11-16 18:18:13 +00:00
Fariborz Jahanian
dbee986290
Issues good diagnostic when @end is missing.
...
// rdar://8283484
llvm-svn: 118629
2010-11-09 20:38:00 +00:00
Chris Lattner
0786544ac5
fix PR8380, a crash on invalid due to an illogical DeclSpec SourceRange being constructed.
...
llvm-svn: 118625
2010-11-09 20:14:26 +00:00
Fariborz Jahanian
d4c5348a55
Diagnose a coherant message when @interface
...
does not terminate with @end .
// rdar: //7824372
llvm-svn: 117991
2010-11-02 00:44:43 +00:00
Abramo Bagnara
932e393fda
Treat __extension__ like ParenExpr.
...
llvm-svn: 116569
2010-10-15 07:51:18 +00:00
Douglas Gregor
b048402073
When we are missing the ',' or '>' to terminate a template parameter
...
list, complain about it! Fixes PR7053.
llvm-svn: 116551
2010-10-15 01:15:58 +00:00
Nick Lewycky
8d3a1783ba
Replace \r\n with \n in this file.
...
llvm-svn: 116312
2010-10-12 16:46:35 +00:00
Francois Pichet
c2bc5ac149
Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.
...
llvm-svn: 116203
2010-10-11 12:59:39 +00:00
Francois Pichet
d61f192b1a
Add 2 Microsoft compiler intrinsics that don't require prototypes:
...
__assume
__noop
llvm-svn: 116202
2010-10-11 12:00:10 +00:00
Francois Pichet
f804a97d4f
_inline is an alias for inline in MSVC.
...
llvm-svn: 115785
2010-10-06 13:02:48 +00:00
Chris Lattner
d7821e4ec4
enhance tentative parsing to handle ms extensions, patch by Martin Vejnar!
...
llvm-svn: 115004
2010-09-28 23:35:09 +00:00
Argyrios Kyrtzidis
40cec8326c
Revert r114316, -Wunused-value enabled by default was intended.
...
llvm-svn: 114318
2010-09-19 23:03:35 +00:00
Argyrios Kyrtzidis
3698bf1c6d
Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194.
...
llvm-svn: 114316
2010-09-19 21:21:44 +00:00
John Thompson
1224061281
Added '|' delimiter to separate inline asm multiple alternative constraints for Clang side of support.
...
llvm-svn: 114253
2010-09-18 01:15:13 +00:00
John Thompson
9a587aaaa9
Add more error checking to attribute vecreturn
...
llvm-svn: 114251
2010-09-18 01:12:07 +00:00
Francois Pichet
9f4f2078d6
Microsoft's __uuidof operator implementation part 1.
...
llvm-svn: 113356
2010-09-08 12:20:18 +00:00
John McCall
1ca73da0e6
Improve error recovery when we see ':' and expect a ';'.
...
I, at least, make this typo all the time.
llvm-svn: 113243
2010-09-07 18:31:03 +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
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
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
John McCall
3669c80de9
Preserve invalidity of typeof operands in C++.
...
llvm-svn: 111999
2010-08-24 23:41:43 +00:00
Fariborz Jahanian
055068df4a
Fix a crash when parsing malformed out-of-line member function
...
definition. radar 8307865.
llvm-svn: 111163
2010-08-16 17:58:53 +00:00
John Thompson
46667afccd
Fix for pr7869, inline asm mult-alt constraints.
...
llvm-svn: 110764
2010-08-11 00:58:20 +00:00
John Thompson
cdb847ba16
Added vecreturn attribute parsing.
...
llvm-svn: 110609
2010-08-09 21:53:52 +00:00
Argyrios Kyrtzidis
c0dc36b213
Change warning about incomplete parsing of C++ default arg to error and provide a test case; thanks Doug!
...
llvm-svn: 110603
2010-08-09 21:08:13 +00:00
Argyrios Kyrtzidis
249179cd73
Introduce a new token kind 'cxx_defaultarg_end' to mark the end of C++ default arguments that were part of
...
lexed method declarations.
This avoid interference with tokens coming after the point where the default arg tokens were 'injected', e.g. for
typedef struct Inst {
void m(int x=0);
} *InstPtr;
when parsing '0' the next token would be '*' and things would be messed up.
llvm-svn: 110436
2010-08-06 09:47:24 +00:00
John McCall
0f8ccc4938
Allow multiple __declspec attributes after a class-key.
...
Patch by Francois Pichet!
llvm-svn: 110344
2010-08-05 17:13:11 +00:00
Eli Friedman
d986fc8b48
Tests for #pragma GCC visibility.
...
llvm-svn: 110316
2010-08-05 07:00:53 +00:00
Chandler Carruth
a12b9deea0
Convert this file to not have Windows line endings -- likely committed from
...
Windows without svn:eol-style=native.
llvm-svn: 110308
2010-08-05 03:16:33 +00:00
Daniel Dunbar
cb82acb884
Parser: Add support for #pragma align, which is just another spelling of #pragma
...
options align.
llvm-svn: 109952
2010-07-31 19:17:07 +00:00