[PATCH] Added const qualifier to Sema::getTypeName's formal parameter `II`
Ismail Pazarbasi
ismail.pazarbasi at gmail.com
Fri May 3 02:36:44 PDT 2013
Hi rsmith, doug.gregor,
Passing const IdentifierInfo& to Sema::getTypeName fails, because parameter is not const qualified. The argument is never modified.
http://llvm-reviews.chandlerc.com/D737
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
Index: include/clang/Sema/Sema.h
===================================================================
--- include/clang/Sema/Sema.h
+++ include/clang/Sema/Sema.h
@@ -1248,7 +1248,7 @@
bool isSimpleTypeSpecifier(tok::TokenKind Kind) const;
- ParsedType getTypeName(IdentifierInfo &II, SourceLocation NameLoc,
+ ParsedType getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
Scope *S, CXXScopeSpec *SS = 0,
bool isClassName = false,
bool HasTrailingDot = false,
Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp
+++ lib/Sema/SemaDecl.cpp
@@ -129,7 +129,7 @@
///
/// If name lookup results in an ambiguity, this routine will complain
/// and then return NULL.
-ParsedType Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc,
+ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
Scope *S, CXXScopeSpec *SS,
bool isClassName, bool HasTrailingDot,
ParsedType ObjectTypePtr,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D737.1.patch
Type: text/x-patch
Size: 1166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130503/cc3c936a/attachment.bin>
More information about the cfe-commits
mailing list