diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-01-04 05:29:21 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-01-04 05:29:21 +0000 |
commit | db67015f2d1d24986f2555263cd37659b287b025 (patch) | |
tree | 96a85e127b6f3b584838c9fd093cd4cf7f866487 /include | |
parent | a17629290b6157dad843001e1cdeb4fe353f2e0f (diff) |
Document that GetTypeForDeclarator() cannot return a null type.
Also add a few asserts for this. The existing code assumes this in a bunch
of places already (see e.g. the assert at the top of ParseTypedefDecl(), and
there are many unchecked calls on the result of GetTypeForDeclarator()), and
from looking through the code this should always be true from what I can tell.
This allows removing ASTContext::getNullTypeSourceInfo() too as that's now
unused.
No behavior change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/ASTContext.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index ef87fa6dd9..195d748b5b 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -273,8 +273,6 @@ class ASTContext : public RefCountedBase<ASTContext> { /// \brief Declaration for the CUDA cudaConfigureCall function. FunctionDecl *cudaConfigureCallDecl; - TypeSourceInfo NullTypeSourceInfo; - /// \brief Keeps track of all declaration attributes. /// /// Since so few decls have attrs, we keep them in a hash map instead of @@ -2173,8 +2171,6 @@ public: getTrivialTypeSourceInfo(QualType T, SourceLocation Loc = SourceLocation()) const; - TypeSourceInfo *getNullTypeSourceInfo() { return &NullTypeSourceInfo; } - /// \brief Add a deallocation callback that will be invoked when the /// ASTContext is destroyed. /// |