[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / Analysis / temporaries-callback-order.cpp
blob120fabc10478e448aabd68d334c1d36159b18738
1 // RUN: %clang_cc1 -analyze -analyzer-checker=debug.AnalysisOrder -analyzer-config debug.AnalysisOrder:Bind=true -analyzer-config debug.AnalysisOrder:RegionChanges=true %s 2>&1 | FileCheck %s
3 struct Super {
4 virtual void m();
5 };
6 struct Sub : Super {
7 virtual void m() {}
8 };
10 void testTemporaries() {
11 // This triggers RegionChanges once for zero-initialization of the structure.
12 Sub().m();
15 void seeIfCheckBindWorks() {
16 // This should trigger checkBind. The rest of the code shouldn't.
17 // This also triggers checkRegionChanges after that.
18 // Note that this function is analyzed first, so the messages would be on top.
19 int x = 1;
22 // seeIfCheckBindWorks():
23 // CHECK: Bind
24 // CHECK-NEXT: RegionChanges
26 // testTemporaries():
27 // CHECK-NEXT: RegionChanges
29 // Make sure there's no further output.
30 // CHECK-NOT: Bind
31 // CHECK-NOT: RegionChanges