xref: /llvm-project/clang/test/Analysis/offsetofexpr-callback.c (revision 1ea584377e7897f7df5302ed9cd378d17be14fbf)
1 // RUN: %clang_analyze_cc1 -analyzer-checker=debug.AnalysisOrder -analyzer-config debug.AnalysisOrder:PreStmtOffsetOfExpr=true,debug.AnalysisOrder:PostStmtOffsetOfExpr=true %s 2>&1 | FileCheck %s
2 #include "Inputs/system-header-simulator.h"
3 
4 struct S {
5   char c;
6 };
7 
test(void)8 void test(void) {
9   offsetof(struct S, c);
10 }
11 
12 // CHECK: PreStmt<OffsetOfExpr>
13 // CHECK-NEXT: PostStmt<OffsetOfExpr>