llvm-project/clang/test/Index/skipped-bodies-unused.cpp
Ilya Biryukov 47e06bb81f [Sema] Do not show unused parameter warnings when body is skipped
Summary: Without the function body, we cannot determine is parameter was used.

Reviewers: ioeric, sammccall

Reviewed By: sammccall

Subscribers: arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D53456

llvm-svn: 345122
2018-10-24 08:29:24 +00:00

9 lines
316 B
C++

// RUN: env CINDEXTEST_SKIP_FUNCTION_BODIES=1 c-index-test -test-load-source all %s -Wunused-parameter 2>&1 \
// RUN: | FileCheck %s
// No 'unused parameter' warnings should be shown when skipping the function bodies.
inline int foo(int used, int unused) {
used = 100;
}
// CHECK-NOT: warning: unused parameter