head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RC4:1.1.1.2 netbsd-11-0-RC3:1.1.1.2 netbsd-11-0-RC2:1.1.1.2 netbsd-11-0-RC1:1.1.1.2 perseant-exfatfs-base-20250801:1.1.1.2 netbsd-11:1.1.1.2.0.10 netbsd-11-base:1.1.1.2 netbsd-10-1-RELEASE:1.1.1.2 perseant-exfatfs-base-20240630:1.1.1.2 perseant-exfatfs:1.1.1.2.0.8 perseant-exfatfs-base:1.1.1.2 netbsd-9-4-RELEASE:1.1.1.1 netbsd-10-0-RELEASE:1.1.1.2 netbsd-10-0-RC6:1.1.1.2 netbsd-10-0-RC5:1.1.1.2 netbsd-10-0-RC4:1.1.1.2 netbsd-10-0-RC3:1.1.1.2 netbsd-10-0-RC2:1.1.1.2 netbsd-10-0-RC1:1.1.1.2 netbsd-10:1.1.1.2.0.6 netbsd-10-base:1.1.1.2 netbsd-9-3-RELEASE:1.1.1.1 cjep_sun2x:1.1.1.2.0.4 cjep_sun2x-base:1.1.1.2 cjep_staticlib_x-base1:1.1.1.2 netbsd-9-2-RELEASE:1.1.1.1 cjep_staticlib_x:1.1.1.2.0.2 cjep_staticlib_x-base:1.1.1.2 netbsd-9-1-RELEASE:1.1.1.1 phil-wifi-20200421:1.1.1.2 phil-wifi-20200411:1.1.1.2 phil-wifi-20200406:1.1.1.2 netbsd-9-0-RELEASE:1.1.1.1 netbsd-9-0-RC2:1.1.1.1 netbsd-9-0-RC1:1.1.1.1 netbsd-9:1.1.1.1.0.6 netbsd-9-base:1.1.1.1 phil-wifi-20190609:1.1.1.1 pgoyette-compat-merge-20190127:1.1.1.1 pgoyette-compat-20190127:1.1.1.1 pgoyette-compat-20190118:1.1.1.1 pgoyette-compat-1226:1.1.1.1 pgoyette-compat-1126:1.1.1.1 pgoyette-compat-1020:1.1.1.1 pgoyette-compat-0930:1.1.1.1 pgoyette-compat-0906:1.1.1.1 pgoyette-compat-0728:1.1.1.1 clang-337282:1.1.1.1 phil-wifi:1.1.1.1.0.4 phil-wifi-base:1.1.1.1 pgoyette-compat-0625:1.1.1.1 pgoyette-compat-0521:1.1.1.1 pgoyette-compat-0502:1.1.1.1 pgoyette-compat-0422:1.1.1.1 pgoyette-compat-0415:1.1.1.1 pgoyette-compat-0407:1.1.1.1 pgoyette-compat-0330:1.1.1.1 pgoyette-compat-0322:1.1.1.1 pgoyette-compat-0315:1.1.1.1 pgoyette-compat:1.1.1.1.0.2 pgoyette-compat-base:1.1.1.1 clang-319952:1.1.1.1 clang-309604:1.1.1.1 LLVM:1.1.1; locks; strict; comment @// @; 1.1 date 2017.08.01.19.34.31; author joerg; state Exp; branches 1.1.1.1; next ; commitid pMuDy65V0VicSx1A; 1.1.1.1 date 2017.08.01.19.34.31; author joerg; state Exp; branches 1.1.1.1.4.1; next 1.1.1.2; commitid pMuDy65V0VicSx1A; 1.1.1.2 date 2019.11.13.22.21.57; author joerg; state dead; branches; next ; commitid QD8YATxuNG34YJKB; 1.1.1.1.4.1 date 2020.04.13.07.49.21; author martin; state dead; branches; next ; commitid X01YhRUPVUDaec4C; desc @@ 1.1 log @Initial revision @ text @// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma -x c++ %S/Inputs/module.map -fmodules-ts // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -fmodules-ts // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_pragma -x c++ %S/Inputs/module.map -fmodules-ts -o %t/explicit.pcm -Werror=string-plus-int // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -fmodules-ts -DEXPLICIT_FLAG -fmodule-file=%t/explicit.pcm import diag_pragma; int foo(int x) { // Diagnostics from templates in the module follow the diagnostic state from // when the module was built. #ifdef EXPLICIT_FLAG // expected-error@@diag_pragma.h:7 {{adding 'int' to a string}} #else // expected-warning@@diag_pragma.h:7 {{adding 'int' to a string}} #endif // expected-note@@diag_pragma.h:7 {{use array indexing}} f(0); // expected-note {{instantiation of}} g(0); // ok, warning was ignored when building module // Diagnostics from this source file ignore the diagnostic state from the // module. void("foo" + x); // expected-warning {{adding 'int' to a string}} // expected-note@@-1 {{use array indexing}} #pragma clang diagnostic ignored "-Wstring-plus-int" // Diagnostics from the module ignore diagnostic state changes from this // source file. #ifdef EXPLICIT_FLAG // expected-error@@diag_pragma.h:7 {{adding 'long' to a string}} #else // expected-warning@@diag_pragma.h:7 {{adding 'long' to a string}} #endif // expected-note@@diag_pragma.h:7 {{use array indexing}} f(0L); // expected-note {{instantiation of}} g(0L); void("bar" + x); if (x = DIAG_PRAGMA_MACRO) // expected-warning {{using the result of an assignment as a condition without parentheses}} \ // expected-note {{place parentheses}} expected-note {{use '=='}} return 0; return 1; } @ 1.1.1.1 log @Import clang r309604 from branches/release_50 @ text @@ 1.1.1.1.4.1 log @Mostly merge changes from HEAD upto 20200411 @ text @@ 1.1.1.2 log @Mark old LLVM instance as dead. @ text @@