diff --git a/clang-tools-extra/test/clang-rename/InvalidOffset.cpp b/clang-tools-extra/test/clang-rename/InvalidOffset.cpp new file mode 100644 index 000000000000..2ae04d01e4a7 --- /dev/null +++ b/clang-tools-extra/test/clang-rename/InvalidOffset.cpp @@ -0,0 +1,9 @@ +#include "Inputs/HeaderWithSymbol.h" +#define FOO int bar; +FOO + +int foo; + +// RUN: not clang-rename -new-name=qux -offset=259 %s -- 2>&1 | FileCheck %s +// CHECK-NOT: CHECK +// CHECK: error: SourceLocation in file {{.*}}InvalidOffset.cpp at offset 259 is invalid