diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-05-05 11:43:30 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-05-05 11:44:03 +0100 |
commit | 0725949d36796960d8815cd6383f339b88dc9a9c (patch) | |
tree | 0ea1644200f50bda7e58d0921b6fdd21172bb1f1 | |
parent | 526c5aacddffa2c3f0e6300dc621e8fee4316493 (diff) |
clang-plugin: Clarify some nullability checker error messages
-rw-r--r-- | clang-plugin/nullability-checker.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang-plugin/nullability-checker.cpp b/clang-plugin/nullability-checker.cpp index f2ae968..4701a02 100644 --- a/clang-plugin/nullability-checker.cpp +++ b/clang-plugin/nullability-checker.cpp @@ -235,15 +235,14 @@ NullabilityVisitor::TraverseFunctionDecl (FunctionDecl* func) } else if (!has_allow_none && !has_assertion) { switch (has_nonnull) { case EXPLICIT_NULLABLE: - /* TODO: Say the nonnull attribute is implicit - * if it was added by the GirConsumer. */ Debug::emit_warning ( "Missing (allow-none) annotation on " "the ‘" + parm_decl->getNameAsString () + "’ parameter of function " + func->getNameAsString () + "() " - "(already has a nonnull attribute).", + "(already has a nonnull attribute or " + "no (allow-none) annotation).", this->_compiler, parm_decl->getLocStart ()); break; @@ -259,15 +258,14 @@ NullabilityVisitor::TraverseFunctionDecl (FunctionDecl* func) parm_decl->getLocStart ()); break; case EXPLICIT_NONNULL: - /* TODO: Say the nonnull attribute is implicit - * if it was added by the GirConsumer. */ Debug::emit_warning ( "Missing non-NULL precondition " "assertion on the ‘" + parm_decl->getNameAsString () + "’ parameter of function " + func->getNameAsString () + "() " - "(already has a nonnull attribute).", + "(already has a nonnull attribute or " + "no (allow-none) annotation).", this->_compiler, parm_decl->getLocStart ()); break; |