diff options
Diffstat (limited to 'lib/Checker/CheckerHelpers.cpp')
-rw-r--r-- | lib/Checker/CheckerHelpers.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Checker/CheckerHelpers.cpp b/lib/Checker/CheckerHelpers.cpp index 8a295fbf4c..e3cb36b00c 100644 --- a/lib/Checker/CheckerHelpers.cpp +++ b/lib/Checker/CheckerHelpers.cpp @@ -65,13 +65,16 @@ bool clang::containsStaticLocal(const Stmt *S) { return false; } -// Recursively find any substatements containing __builtin_offset_of +// Recursively find any substatements containing __builtin_offsetof bool clang::containsBuiltinOffsetOf(const Stmt *S) { const UnaryOperator *UO = dyn_cast<UnaryOperator>(S); if (UO && UO->getOpcode() == UnaryOperator::OffsetOf) return true; + if (isa<OffsetOfExpr>(S)) + return true; + for (Stmt::const_child_iterator I = S->child_begin(); I != S->child_end(); ++I) if (const Stmt *child = *I) |