aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-06-27 16:32:27 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-06-27 16:32:27 +0000
commit6628969c3e3886b68d8a0051df7e222aa50ef118 (patch)
tree7d381cd266ec5725a3638002d13544eb1cefb613 /lib/Sema/SemaExpr.cpp
parentd944a9b7a680be2ce74aa9398e0604fdebf0338a (diff)
Cleanup a fixme by using a specific diagnostic for subscripting
a pointer to void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index d644e55989..3423d71af4 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3092,9 +3092,8 @@ Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc,
if (ResultType->isVoidType() && !getLangOptions().CPlusPlus) {
// GNU extension: subscripting on pointer to void
- // FIXME: Use a better warning for this.
- Diag(LLoc, diag::ext_gnu_void_ptr)
- << 0 << BaseExpr->getSourceRange();
+ Diag(LLoc, diag::ext_gnu_subscript_void_type)
+ << BaseExpr->getSourceRange();
// C forbids expressions of unqualified void type from being l-values.
// See IsCForbiddenLValueType.