summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExceptionSpec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added missing IgnoreParens().Abramo Bagnara2010-12-141-3/+1
| | | | llvm-svn: 121795
* Restore r121752 without modification.John McCall2010-12-141-18/+17
| | | | llvm-svn: 121763
* Pull out r121752 in case it's causing the selfhost breakage.John McCall2010-12-141-17/+18
| | | | llvm-svn: 121759
* Factor out most of the extra state in a FunctionProtoType into a separateJohn McCall2010-12-141-18/+17
| | | | | | | class to be passed around. The line between argument and return types and everything else is kindof vague, but I think it's justifiable. llvm-svn: 121752
* Added ParenType type node.Abramo Bagnara2010-12-101-0/+2
| | | | llvm-svn: 121488
* Emulate (some of) Microsoft's looser semantic checking of exceptionDouglas Gregor2010-08-301-0/+8
| | | | | | specifications, from Martin Vejnar! llvm-svn: 112482
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-1/+1
| | | | llvm-svn: 110945
* Disable exception-spec compatibility checking under -fno-exceptions.John McCall2010-05-281-0/+9
| | | | | | Fixes PR7243. llvm-svn: 104942
* Use CanQualType to enforce the use of a canonical type argument toDouglas Gregor2010-05-211-1/+1
| | | | | | | CXXBasePaths::isAmbiguous(), rather than just asserting that we have a canonical type. Fixes PR7176. llvm-svn: 104374
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-311-2/+1
| | | | | | the C-only "optimization". llvm-svn: 100022
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-311-1/+2
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-311-2/+1
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* the big refactoring bits of PR3782.Rafael Espindola2010-03-301-4/+2
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* Optimize PartialDiagnostic's memory-allocation behavior by placing aDouglas Gregor2010-03-291-10/+14
| | | | | | | | | | | | | | cache of PartialDiagnostic::Storage objects into an allocator within the ASTContext. This eliminates a significant amount of malloc traffic, for a 10% performance improvement in -fsyntax-only wall-clock time with 403.gcc's combine.c. Also, eliminate the RequireNonAbstractType hack I put in earlier, which was but a symptom of this larger problem. Fixes <rdar://problem/7806091>. llvm-svn: 99849
* When a declaration of a function is missing an exception specificationDouglas Gregor2010-03-241-14/+115
| | | | | | | | | | | | | | | | | | | | | that was present in a prior declaration, emit a warning rather than a hard error (which we did before, and still do with mismatched exception specifications). Moreover, provide a fix-it hint with the throw() clause that should be added, e.g., t.C:10:7: warning: 'operator new' is missing exception specification 'throw(std::bad_alloc)' void *operator new(unsigned long sz) ^ throw(std::bad_alloc) As part of this, disable the warning when we're missing an exception specification on operator new, operator new[], operator delete, or operator delete[] when exceptions are turned off (-fno-exceptions). Fixes PR5957. llvm-svn: 99388
* Perform access control for the implicit base and member destructor callsJohn McCall2010-03-161-3/+3
| | | | | | required when emitting a destructor definition. llvm-svn: 98609
* Work around an annoying, non-standard optimization in the glibcDouglas Gregor2010-02-121-2/+63
| | | | | | | | | | | | | | | | | | | | | | headers, where malloc (and many other libc functions) are declared with empty throw specifications, e.g., extern void *malloc (__SIZE_TYPE__ __size) throw () __attribute__ ((__malloc__)) ; The C++ standard doesn't seem to allow this, and redeclaring malloc as the standard permits (as follows) resulted in Clang (rightfully!) complaining about mis-matched exception specifications. void *malloc(size_t size); We work around this by silently propagating an empty throw specification "throw()" from a function with C linkage declared in a system header to a redeclaration that has no throw specifier. Ick. llvm-svn: 95969
* Improve access control diagnostics. Perform access control on member-pointerJohn McCall2010-02-101-2/+16
| | | | | | | conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. llvm-svn: 95775
* Implement C++ DR437, which involves exception-specifications that nameDouglas Gregor2009-12-101-4/+13
| | | | | | a type currently being defined, from Nicola Gigante! llvm-svn: 91052
* First part of changes to eliminate problems with cv-qualifiers andDouglas Gregor2009-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sugared types. The basic problem is that our qualifier accessors (getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at the current QualType and not at any qualifiers that come from sugared types, meaning that we won't see these qualifiers through, e.g., typedefs: typedef const int CInt; typedef CInt Self; Self.isConstQualified() currently returns false! Various bugs (e.g., PR5383) have cropped up all over the front end due to such problems. I'm addressing this problem by splitting each qualifier accessor into two versions: - the "local" version only returns qualifiers on this particular QualType instance - the "normal" version that will eventually combine qualifiers from this QualType instance with the qualifiers on the canonical type to produce the full set of qualifiers. This commit adds the local versions and switches a few callers from the "normal" version (e.g., isConstQualified) over to the "local" version (e.g., isLocalConstQualified) when that is the right thing to do, e.g., because we're printing or serializing the qualifiers. Also, switch a bunch of Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType() expressions over to Context.hasSameUnqualifiedType(T1, T2) llvm-svn: 88969
* Have the exception specification checkers take partial diagnostics. Use this ↵Sebastian Redl2009-10-141-11/+14
| | | | | | to merge two diagnostics. llvm-svn: 84105
* Use CanQualType in the exception specification verification type sets.Sebastian Redl2009-10-141-3/+3
| | | | llvm-svn: 84101
* Use partial diagnostics properly in call to RequireCompleteType. Among other ↵Sebastian Redl2009-10-141-8/+6
| | | | | | things, this means we get a note on the declaration of the incomplete type when it is used in an exception specification. llvm-svn: 84099
* Do exception spec compatibility tests for member pointers, too.Sebastian Redl2009-10-141-0/+5
| | | | llvm-svn: 84098
* Types appearing more than once in a spec shouldn't matter.Sebastian Redl2009-10-111-5/+10
| | | | llvm-svn: 83766
* Test exception spec compatibility on return type and parameters.Sebastian Redl2009-10-111-0/+309
Along the way, use RequireCompleteType when testing exception spec types. Separate all the ugly spec stuff into its own file. llvm-svn: 83764
OpenPOWER on IntegriCloud