[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / shift-negative-value.c
blobe7b749c77d88a2f2720b0958a71b8b3d2eb497f2
1 // RUN: %clang_cc1 -x c -fsyntax-only -verify=expected,c -pedantic %s
2 // RUN: %clang_cc1 -x c++ -fsyntax-only -verify=expected,cpp -Wshift-negative-value %s
3 // RUN: %clang_cc1 -x c++ -fsyntax-only -verify=expected,cpp -Wall %s
4 // RUN: %clang_cc1 -x c++ -std=c++98 -fsyntax-only -verify=expected,cpp -Wshift-negative-value %s
5 // RUN: %clang_cc1 -x c++ -std=c++98 -fsyntax-only -verify=expected,cpp -Wall %s
6 // RUN: %clang_cc1 -x c++ -std=c++11 -fsyntax-only -verify=expected,cpp -Wshift-negative-value %s
7 // RUN: %clang_cc1 -x c++ -std=c++11 -fsyntax-only -verify=expected,cpp -Wall %s
9 enum shiftof {
10 X = (-1<<29) // c-warning {{expression is not an integer constant expression; folding it to a constant is a GNU extension}}
11 // cpp-error@-1 {{expression is not an integral constant expression}}
12 // expected-note@-2 {{left shift of negative value -1}}