]> granicus.if.org Git - clang/commit
Modify how the -verify flag works. Currently, the verification string and
authorRichard Trieu <rtrieu@google.com>
Thu, 15 Dec 2011 00:38:15 +0000 (00:38 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 15 Dec 2011 00:38:15 +0000 (00:38 +0000)
commit2fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fc
tree29e2aab8ed6d3dda663e31e3ed5434a0d3e26163
parent60ef308e51c71b760d7f598c1b763ceb7b768148
Modify how the -verify flag works.  Currently, the verification string and
diagnostic message are compared.  If either is a substring of the other, then
no error is given.  This gives rise to an unexpected case:

  // expect-error{{candidate function has different number of parameters}}

will match the following error messages from Clang:

  candidate function has different number of parameters (expected 1 but has 2)
  candidate function has different number of parameters

It will also match these other error messages:

  candidate function
  function has different number of parameters
  number of parameters

This patch will change so that the verification string must be a substring of
the diagnostic message before accepting.  Also, all the failing tests from this
change have been corrected.  Some stats from this cleanup:

87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146619 91177308-0d34-0410-b5e6-96231b3b80d8
106 files changed:
lib/Frontend/VerifyDiagnosticConsumer.cpp
test/ARCMT/nonobjc-to-objc-cast-2.m
test/Analysis/CFDateGC.m
test/Analysis/NSString.m
test/Analysis/method-arg-decay.m
test/Analysis/retain-release-path-notes-gc.m
test/Analysis/retain-release-path-notes.m
test/Analysis/retain-release-region-store.m
test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp
test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp
test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
test/CXX/basic/basic.start/basic.start.main/p2f.cpp
test/CXX/class.access/p6.cpp
test/CXX/class.derived/class.member.lookup/p6.cpp
test/CXX/class/class.friend/p1.cpp
test/CXX/class/class.mem/p13.cpp
test/CXX/class/class.nest/p1-cxx0x.cpp
test/CXX/class/class.nest/p1.cpp
test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp
test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp
test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp
test/CXX/over/over.over/p2-resolve-single-template-id.cpp
test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
test/FixIt/typo.c
test/Lexer/rdr-6096838-2.c
test/Lexer/string-literal-encoding.c
test/Lexer/string_concat.cpp
test/Misc/diag-aka-types.cpp
test/Misc/diag-verify.cpp [new file with mode: 0644]
test/Modules/macros.c
test/Modules/normal-module-map.cpp
test/PCH/typo.cpp
test/Parser/attr-availability.c
test/Parser/check-syntax-1.m
test/Parser/cxx-altivec.cpp
test/Parser/cxx-typeid.cpp
test/Parser/cxx0x-lambda-expressions.cpp
test/Parser/objc-category-neg-1.m
test/Parser/objc-forcollection-neg-2.m
test/Parser/objc-init.m
test/Parser/recovery.c
test/Sema/attr-unavailable-message.c
test/Sema/block-misc.c
test/Sema/builtins.c
test/Sema/format-strings-size_t.c
test/Sema/implicit-builtin-redecl.c
test/Sema/overloadable-complex.c
test/Sema/overloadable.c
test/Sema/thread-specifier.c
test/SemaCXX/MicrosoftCompatibility.cpp
test/SemaCXX/access.cpp
test/SemaCXX/addr-of-overloaded-function.cpp
test/SemaCXX/class.cpp
test/SemaCXX/complex-overload.cpp
test/SemaCXX/dcl_init_aggr.cpp
test/SemaCXX/exceptions.cpp
test/SemaCXX/explicit.cpp
test/SemaCXX/incomplete-call.cpp
test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp
test/SemaCXX/overload-call.cpp
test/SemaCXX/overload-member-call.cpp
test/SemaCXX/overloaded-operator.cpp
test/SemaCXX/reinterpret-fn-obj-pedantic.cpp
test/SemaCXX/scope-check.cpp
test/SemaCXX/statements.cpp
test/SemaCXX/this.cpp
test/SemaCXX/typeid.cpp
test/SemaCXX/uninit-variables.cpp
test/SemaCXX/warn-bool-conversion.cpp
test/SemaCXX/warn-thread-safety-analysis.cpp
test/SemaCXX/warn-thread-safety-parsing.cpp
test/SemaObjC/arc.m
test/SemaObjC/attr-deprecated.m
test/SemaObjC/blocks.m
test/SemaObjC/call-super-2.m
test/SemaObjC/category-1.m
test/SemaObjC/class-extension-dup-methods.m
test/SemaObjC/compare-qualified-id.m
test/SemaObjC/comptypes-1.m
test/SemaObjC/comptypes-7.m
test/SemaObjC/conditional-expr-3.m
test/SemaObjC/conditional-expr.m
test/SemaObjC/gcc-cast-ext.m
test/SemaObjC/invalid-objc-decls-1.m
test/SemaObjC/ivar-lookup.m
test/SemaObjC/method-bad-param.m
test/SemaObjC/method-not-defined.m
test/SemaObjC/method-undef-category-warn-1.m
test/SemaObjC/method-undef-extension-warn-1.m
test/SemaObjC/missing-method-return-type.m
test/SemaObjC/no-protocol-option-tests.m
test/SemaObjC/property-9.m
test/SemaObjC/property-lookup-in-id.m
test/SemaObjC/scope-check.m
test/SemaObjC/special-dep-unavail-warning.m
test/SemaObjC/super.m
test/SemaObjC/try-catch.m
test/SemaObjC/undef-protocol-methods-1.m
test/SemaObjC/warn-implicit-atomic-property.m
test/SemaObjC/warn-strict-selector-match.m
test/SemaObjCXX/warn-strict-selector-match.mm
test/SemaTemplate/explicit-instantiation.cpp
test/SemaTemplate/friend.cpp
test/SemaTemplate/instantiate-expr-5.cpp