summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExceptionSpec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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