mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 19:45:40 -04:00

This expression may or may not be evaluated in compile time, so tracking the result symbol is of potential interest. However, run-time offsetof is not yet supported by the analyzer, so for now this callback is only there to assist future implementation. Patch by Henry Wong! Differential Revision: https://reviews.llvm.org/D42300 llvm-svn: 324790
13 lines
378 B
C
13 lines
378 B
C
// RUN: %clang_analyze_cc1 -analyzer-checker=debug.AnalysisOrder -analyzer-config debug.AnalysisOrder:PreStmtOffsetOfExpr=true,debug.AnalysisOrder:PostStmtOffsetOfExpr=true %s 2>&1 | FileCheck %s
|
|
#include "Inputs/system-header-simulator.h"
|
|
|
|
struct S {
|
|
char c;
|
|
};
|
|
|
|
void test() {
|
|
offsetof(struct S, c);
|
|
}
|
|
|
|
// CHECK: PreStmt<OffsetOfExpr>
|
|
// CHECK-NEXT: PostStmt<OffsetOfExpr>
|