This is an archive of the discontinued LLVM Phabricator instance.

[clang][SemaTemplate] Fix a stack use after scope
ClosedPublic

Authored by kadircet on Feb 17 2022, 8:24 AM.

Diff Detail

Event Timeline

kadircet requested review of this revision.Feb 17 2022, 8:24 AM
kadircet created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2022, 8:24 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sammccall accepted this revision.Feb 17 2022, 8:30 AM
sammccall added inline comments.
clang/include/clang/AST/DeclTemplate.h
2464

Is this change just to emphasize that this constructor won't copy the contents?

clang/lib/AST/DeclTemplate.cpp
1103

just initialize to params.size already? or inline this variable

This revision is now accepted and ready to land.Feb 17 2022, 8:30 AM
kadircet updated this revision to Diff 409752.Feb 17 2022, 12:47 PM
kadircet marked 2 inline comments as done.
  • Inline Params.size()
clang/include/clang/AST/DeclTemplate.h
2464

yes and also to keep the implementation of the constructor simple.

This revision was landed with ongoing or failed builds.Feb 17 2022, 12:48 PM
This revision was automatically updated to reflect the committed changes.