diff options
author | Hans Wennborg <hans@hanshq.net> | 2011-12-08 15:56:07 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2011-12-08 15:56:07 +0000 |
commit | e3ca33aba226c7b5d50703df008ef0ef5f9ea7da (patch) | |
tree | 68bc65ba40d90b5489af9097db3c6eac1e120b03 /test/Sema/implicit-decl.c | |
parent | 90ec96f3026480fa41057b05d58f338aed585f62 (diff) |
Only do typo correction for implicit function decls when
they are treated as errors.
Doing typo correction when these are just warnings slows down the
compilation of source which deliberately uses implicit function
declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/implicit-decl.c')
-rw-r--r-- | test/Sema/implicit-decl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Sema/implicit-decl.c b/test/Sema/implicit-decl.c index 72e42e05bb..2e1a865254 100644 --- a/test/Sema/implicit-decl.c +++ b/test/Sema/implicit-decl.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only -Werror typedef int int32_t; typedef unsigned char Boolean; @@ -10,10 +10,10 @@ void func() { const char compDesc[16 + 1]; int32_t compCount = 0; if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-note {{previous implicit declaration is here}} \ - expected-warning {{implicit declaration of function '_CFCalendarDecomposeAbsoluteTimeV' is invalid in C99}} + expected-error {{implicit declaration of function '_CFCalendarDecomposeAbsoluteTimeV' is invalid in C99}} } - printg("Hello, World!\n"); // expected-warning{{implicit declaration of function 'printg' is invalid in C99}} \ + printg("Hello, World!\n"); // expected-error{{implicit declaration of function 'printg' is invalid in C99}} \ // expected-note{{did you mean 'printf'?}} __builtin_is_les(1, 3); // expected-error{{use of unknown builtin '__builtin_is_les'}} \ |