I've been seeing errors from this test recently: Command Output (stderr): -- 1 error generated. Error while processing /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/extra/test/clang-tidy/diagnostic.cpp.nonexistent.cpp. /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/extra/test/clang-tidy/diagnostic.cpp:10:12: error: expected string not found in input // CHECK2: :[[@LINE+2]]:9: warning: implicit conversion from 'double' to 'int' changes value from 1.5 to 1 [clang-diagnostic-literal-conversion] ^ <stdin>:2:1: note: scanning from here Skipping /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/extra/test/clang-tidy/diagnostic.cpp. Compile command not found. ^ <stdin>:2:1: note: with expression "@LINE+2" equal to "12" Skipping /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/extra/test/clang-tidy/diagnostic.cpp. Compile command not found. ^
Specifically, the output is: $ ./bin/clang-tidy -checks='-*,clang-diagnostic-*,google-explicit-constructor' /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/extra/test/clang-tidy/diagnostic.cpp -- -fan-unknown-option 2>&1 error: unknown argument: '-fan-unknown-option' Skipping /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/extra/test/clang-tidy/diagnostic.cpp. Compile command not found. Does this look like it might be related to any of your changes in this area? Perhaps the error due to unknown argument is causing clang-tidy not to continue on to run the check & report the warning? On Wed, May 24, 2017 at 3:51 AM Serge Pavlov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: sepavloff > Date: Wed May 24 05:50:56 2017 > New Revision: 303735 > > URL: http://llvm.org/viewvc/llvm-project?rev=303735&view=rev > Log: > Modify test so that it looks for patterns in stderr as well > > With the change https://reviews.llvm.org/D33013 driver will not build > compilation object if command line is invalid, in particular, if > unrecognized option is provided. In such cases it will prints diagnostics > on stderr. The test 'clang-tidy/diagnostic.cpp' checks reaction on > unrecognized option and will fail when D33013 is applied because it checks > only stdout for test patterns and expects the name of diagnostic category > prepared by clang-tidy. With this change the test makes more general check > and must work in either case. > > Differential Revision: https://reviews.llvm.org/D33173 > > Modified: > clang-tools-extra/trunk/test/clang-tidy/diagnostic.cpp > > Modified: clang-tools-extra/trunk/test/clang-tidy/diagnostic.cpp > URL: > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/diagnostic.cpp?rev=303735&r1=303734&r2=303735&view=diff > > ============================================================================== > --- clang-tools-extra/trunk/test/clang-tidy/diagnostic.cpp (original) > +++ clang-tools-extra/trunk/test/clang-tidy/diagnostic.cpp Wed May 24 > 05:50:56 2017 > @@ -1,11 +1,11 @@ > // RUN: clang-tidy -checks='-*,modernize-use-override' %s.nonexistent.cpp > -- | FileCheck -check-prefix=CHECK1 > -implicit-check-not='{{warning:|error:}}' %s > -// RUN: clang-tidy > -checks='-*,clang-diagnostic-*,google-explicit-constructor' %s -- > -fan-unknown-option | FileCheck -check-prefix=CHECK2 > -implicit-check-not='{{warning:|error:}}' %s > -// RUN: clang-tidy > -checks='-*,google-explicit-constructor,clang-diagnostic-literal-conversion' > %s -- -fan-unknown-option | FileCheck -check-prefix=CHECK3 > -implicit-check-not='{{warning:|error:}}' %s > +// RUN: clang-tidy > -checks='-*,clang-diagnostic-*,google-explicit-constructor' %s -- > -fan-unknown-option 2>&1 | FileCheck -check-prefix=CHECK2 > -implicit-check-not='{{warning:|error:}}' %s > +// RUN: clang-tidy > -checks='-*,google-explicit-constructor,clang-diagnostic-literal-conversion' > %s -- -fan-unknown-option 2>&1 | FileCheck -check-prefix=CHECK3 > -implicit-check-not='{{warning:|error:}}' %s > // RUN: clang-tidy > -checks='-*,modernize-use-override,clang-diagnostic-macro-redefined' %s -- > -DMACRO_FROM_COMMAND_LINE | FileCheck -check-prefix=CHECK4 > -implicit-check-not='{{warning:|error:}}' %s > > // CHECK1: error: error reading '{{.*}}.nonexistent.cpp' > [clang-diagnostic-error] > -// CHECK2: error: unknown argument: '-fan-unknown-option' > [clang-diagnostic-error] > -// CHECK3: error: unknown argument: '-fan-unknown-option' > [clang-diagnostic-error] > +// CHECK2: error: unknown argument: '-fan-unknown-option' > +// CHECK3: error: unknown argument: '-fan-unknown-option' > > // CHECK2: :[[@LINE+2]]:9: warning: implicit conversion from 'double' to > 'int' changes value from 1.5 to 1 [clang-diagnostic-literal-conversion] > // CHECK3: :[[@LINE+1]]:9: warning: implicit conversion from 'double' to > 'int' changes value > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits