summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/implicit-decl.c
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2011-12-08 15:56:07 +0000
committerHans Wennborg <hans@hanshq.net>2011-12-08 15:56:07 +0000
commit70a1324428a5a0805b525be11c08f180eb049e16 (patch)
tree73eaf142843056e4650ab18a67754d606d439cb9 /clang/test/Sema/implicit-decl.c
parent0faa233439eeda8cb76b73750cab369f24c9ed3b (diff)
downloadbcm5719-llvm-70a1324428a5a0805b525be11c08f180eb049e16.tar.gz
bcm5719-llvm-70a1324428a5a0805b525be11c08f180eb049e16.zip
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. llvm-svn: 146153
Diffstat (limited to 'clang/test/Sema/implicit-decl.c')
-rw-r--r--clang/test/Sema/implicit-decl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Sema/implicit-decl.c b/clang/test/Sema/implicit-decl.c
index 72e42e05bb6..2e1a8652546 100644
--- a/clang/test/Sema/implicit-decl.c
+++ b/clang/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'}} \
OpenPOWER on IntegriCloud