Dmitri Gribenko
a664e5b88f
Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
...
llvm-svn: 163983
2012-09-15 20:20:27 +00:00
Richard Smith
da83703ed4
Fix some dead stores which the static analyzer warned about. No functionality
...
change (the problematic cases in ParseDecl.cpp are currently impossible).
llvm-svn: 163920
2012-09-14 18:27:01 +00:00
Richard Smith
7696571d2b
Recover properly after a parse error in a static_assert declaration.
...
llvm-svn: 163826
2012-09-13 19:12:50 +00:00
Dmitri Gribenko
00bcdd3192
Fix a couple of Doxygen issues pointed out by -Wdocumentation.
...
llvm-svn: 163722
2012-09-12 17:01:48 +00:00
Ted Kremenek
191ffd35a0
Revert "objective-C: warn under a flag if missing argument"
...
We plan on discussing this more, but we shouldn't have it in the compiler
in an incomplete state.
llvm-svn: 163720
2012-09-12 16:50:35 +00:00
Ted Kremenek
632a6432f5
Revert "objective-C: warn if selector has nothing but bare"
...
We plan on discussing this more.
llvm-svn: 163719
2012-09-12 16:50:30 +00:00
Fariborz Jahanian
822ab6b2e4
objective-C: warn if selector has nothing but bare
...
':' in its name. // rdar://8366823
llvm-svn: 163650
2012-09-11 21:27:45 +00:00
Fariborz Jahanian
66d2e88799
objective-C: warn under a flag if missing argument
...
name results in unintended selector name.
// rdar://12263549
llvm-svn: 163634
2012-09-11 17:24:26 +00:00
Douglas Gregor
3d05040cc1
Remove unused macro definition
...
llvm-svn: 163598
2012-09-11 06:33:46 +00:00
Joao Matos
566359c0bf
Revert r163083 per chandlerc's request.
...
llvm-svn: 163149
2012-09-04 17:49:35 +00:00
Joao Matos
c32a7e4d8e
Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.
...
llvm-svn: 163083
2012-09-02 03:45:41 +00:00
Joao Matos
e9a3ed4d71
Normalize line endings of r163013 (part 2).
...
llvm-svn: 163032
2012-08-31 22:18:20 +00:00
Joao Matos
dc86f94f62
Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
...
llvm-svn: 163013
2012-08-31 18:45:21 +00:00
Douglas Gregor
8bea83a866
Extend the "__is_pod" hack, which demotes various type trait keywords
...
(__is_pod, __is_signed, etc.) to normal identifiers if they are
encountered in certain places in the grammar where we know that prior
versions of libstdc++ or libc++ use them, to still allow the use of
these keywords as type traits. Fixes <rdar://problem/9836262> and PR10184.
llvm-svn: 162937
2012-08-30 20:04:43 +00:00
Chad Rosier
de70e0ef45
[ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.
...
No functional change intended.
llvm-svn: 162632
2012-08-25 00:11:56 +00:00
Chad Rosier
175ea24e38
[ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
...
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This
should restore the behavior of clang to that prior to r158325.
<rdar://problem/12163681>
llvm-svn: 162602
2012-08-24 21:42:51 +00:00
Dmitri Gribenko
dd28e7930c
Fix a few -Wdocumentation warnings.
...
llvm-svn: 162506
2012-08-24 00:01:24 +00:00
Benjamin Kramer
cc4c49dd63
Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.
...
This required changing all get() calls to data() and using the simpler constructors.
llvm-svn: 162501
2012-08-23 23:38:35 +00:00
Benjamin Kramer
f062343889
Remove ASTOwningVector, it doesn't own anything and provides no value over SmallVector.
...
llvm-svn: 162492
2012-08-23 22:51:59 +00:00
Benjamin Kramer
62b95d88dc
Rip out remnants of move semantic emulation and smart pointers in Sema.
...
These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.
llvm-svn: 162475
2012-08-23 21:35:17 +00:00
Richard Smith
7aed66bbee
When disambiguating an expression-statement from a declaraton-statement, if the
...
statement starts with an identifier for which name lookup will fail either way,
look at later tokens to disambiguate in order to improve error recovery.
llvm-svn: 162464
2012-08-23 20:19:14 +00:00
Dmitri Gribenko
adba9be7c5
Fix a bunch of -Wdocumentation warnings.
...
llvm-svn: 162452
2012-08-23 17:58:28 +00:00
David Blaikie
5bd4c2ace4
Use LLVM_BUILTIN_TRAP instead of lame volatile int traps.
...
(from a todo mentioned in r159469 & originally suggested by Chandler Carruth)
llvm-svn: 162302
2012-08-21 18:56:49 +00:00
Sam Panzer
0f38443616
Better diagnostics for range-based for loops with bad range types.
...
The old error message stating that 'begin' was an undeclared identifier
is replaced with a new message explaining that the error is in the range
expression, along with which of the begin() and end() functions was
problematic if relevant.
Additionally, if the range was a pointer type or defines operator*,
attempt to dereference the range, and offer a FixIt if the modified range
works.
llvm-svn: 162248
2012-08-21 00:52:01 +00:00
DeLesley Hutchins
f1150d3a16
Thread-safety analysis: fix scoping issues related to 'this', including an
...
ICE in friend functions.
llvm-svn: 162229
2012-08-20 21:32:18 +00:00
Richard Smith
62e6630af9
PR13619: Make sure we're not at EOF before looking at NextToken().
...
llvm-svn: 162212
2012-08-20 17:37:52 +00:00
Richard Smith
4f605aff7f
PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers and
...
nested names as id-expressions, using the annot_primary_expr annotation, where
possible. This removes some redundant lookups, and also allows us to
typo-correct within tentative parsing, and to carry on disambiguating past an
identifier which we can determine will fail lookup as both a type and as a
non-type, allowing us to disambiguate more declarations (and thus offer
improved error recovery for such cases).
This also introduces to the parser the notion of a tentatively-declared name,
which is an identifier which we *might* have seen a declaration for in a
tentative parse (but only if we end up disambiguating the tokens as a
declaration). This is necessary to correctly disambiguate cases where a
variable is used within its own initializer.
llvm-svn: 162159
2012-08-18 00:55:03 +00:00
Dmitri Gribenko
e4a5a90e8d
Add support for "type safety" attributes that allow checking that 'void *'
...
function arguments and arguments for variadic functions are of a particular
type which is determined by some other argument to the same function call.
Usecases include:
* MPI library implementations, where these attributes enable checking that
buffer type matches the passed MPI_Datatype;
* for HDF5 library there is a similar usecase as MPI;
* checking types of variadic functions' arguments for functions like
fcntl() and ioctl().
llvm-svn: 162067
2012-08-17 00:08:38 +00:00
Sam Panzer
2c4ca0fa7d
Removed unused LParenLoc parameter to ActOnCXXForRangeStmt
...
llvm-svn: 162048
2012-08-16 21:47:25 +00:00
DeLesley Hutchins
19c722d61d
Thread safety analysis: prevent a compiler error in cases where a
...
late-parsed attribute is attached to an invalid declaration.
llvm-svn: 161997
2012-08-15 22:41:04 +00:00
Chad Rosier
aa7c1cb5f8
[ms-inline asm] MSVC parses multiple __asm statements on a single line as one
...
statement. For example,
if (x)
__asm out dx, ax __asm out dx, ax
results in a single inline asm statement (i.e., both "out dx, ax" statements are
predicated on if(x)).
llvm-svn: 161986
2012-08-15 21:03:27 +00:00
Chad Rosier
b6f46c1af9
[ms-inline asm] Add the left brace source location and improve the pretty
...
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>.
llvm-svn: 161958
2012-08-15 16:53:30 +00:00
Chad Rosier
767a7b9ed0
[ms-inline asm] Remove the last bits of LineEnds.
...
llvm-svn: 161904
2012-08-14 23:14:45 +00:00
Chad Rosier
c97a6bbfd8
[ms-inline asm] Add a helpful assert.
...
llvm-svn: 161890
2012-08-14 19:22:06 +00:00
Fariborz Jahanian
5e74a1af6f
Removed an unused function I added a while back.
...
llvm-svn: 161714
2012-08-10 22:28:13 +00:00
Fariborz Jahanian
f64b4722eb
objective-C++: dalyed parsing of ctors with member
...
initializer list defined inside an objc class
implementation. wip
llvm-svn: 161699
2012-08-10 21:15:06 +00:00
Fariborz Jahanian
053227f808
objective-C++: delay parsing of ctor with try block
...
with member initializer list defined inside
an objc implementation block. wip.
llvm-svn: 161692
2012-08-10 20:34:17 +00:00
Fariborz Jahanian
8cecfe9fc9
objective-C++: delayed parsing of member function with
...
function-try-block occuring in objc's implementation
block. wip.
llvm-svn: 161675
2012-08-10 18:10:56 +00:00
Fariborz Jahanian
712bb81a6d
objective-C++: Delayed parsing of most common
...
member functions defined inside an objc class
implementation. wip.
llvm-svn: 161667
2012-08-10 15:54:40 +00:00
Fariborz Jahanian
656b5a0937
objective-C: refactoring of objc's delayed parsing.
...
llvm-svn: 161620
2012-08-09 21:12:39 +00:00
Richard Smith
10c6072d61
In 'delete []', the '[]' never starts a lambda. Update a FIXME with a standard reference and add a test.
...
llvm-svn: 161604
2012-08-09 19:01:51 +00:00
Fariborz Jahanian
db5743d1b4
objective-C: minor refactoring in method
...
definition parsing logic.
llvm-svn: 161593
2012-08-09 17:15:00 +00:00
Eli Friedman
934dbbfa11
Minor simplification for r161534.
...
llvm-svn: 161544
2012-08-08 23:53:27 +00:00
Fariborz Jahanian
18d0a5d509
objective-C: refactor/simplify parsing of delayed
...
method/c-funcs defined in objc class implementation.
No intended functionality change.
llvm-svn: 161540
2012-08-08 23:41:08 +00:00
Eli Friedman
ba01f2bc04
Fix r161534 so it actually builds.
...
llvm-svn: 161539
2012-08-08 23:35:12 +00:00
Richard Smith
ac4e36d1af
PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.
...
llvm-svn: 161537
2012-08-08 23:32:13 +00:00
Eli Friedman
89b1f2c7e1
Handle deprecation diagnostics correctly for C struct fields and Objective-C properties/ivars. <rdar://problem/6642337>.
...
llvm-svn: 161534
2012-08-08 23:04:35 +00:00
Chad Rosier
3ed0bd9938
[ms-inline asm] Refactor the logic to generate the AsmString into Sema. No
...
functional change intended.
llvm-svn: 161518
2012-08-08 19:48:07 +00:00
Chad Rosier
99fc38191b
[ms-inline asm] Stmt destructors are never called, so allocate the AsmToks using
...
the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface.
llvm-svn: 161373
2012-08-07 00:29:06 +00:00
Chad Rosier
c6c7133ed6
[ms-inline asm] Pass Tokens to Sema and store them in the AST. No functional
...
change intended. No test case as there's no real way to test at this time.
llvm-svn: 161342
2012-08-06 20:03:45 +00:00