Skip to content

Commit 0daf453

Browse files
committed
lifetime-safety-paren
1 parent b90459c commit 0daf453

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Analysis/LifetimeSafety/Origins.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Origin &OriginManager::addOrigin(OriginID ID, const clang::Expr &E) {
3434

3535
// TODO: Mark this method as const once we remove the call to getOrCreate.
3636
OriginID OriginManager::get(const Expr &E) {
37+
if (auto *ParenIgnored = E.IgnoreParens(); ParenIgnored != &E)
38+
return get(*ParenIgnored);
3739
auto It = ExprToOriginID.find(&E);
3840
if (It != ExprToOriginID.end())
3941
return It->second;

0 commit comments

Comments
 (0)