[NFC] Don't pass temporary LangOptions to Lexer
authorDawid Jurczak <dawid_jurek@vp.pl>
Mon, 28 Feb 2022 19:14:44 +0000 (20:14 +0100)
committerDawid Jurczak <dawid_jurek@vp.pl>
Mon, 28 Feb 2022 19:43:28 +0000 (20:43 +0100)
commitb3e2dac27c0cd4562e4ece5d5e24a1e59705c746
treea41797897105b2b9c526a592aed4d07b28fa2a5e
parent517171ce209adcf00214b305b8600587b3de9763
[NFC] Don't pass temporary LangOptions to Lexer

Since https://reviews.llvm.org/D120334 we shouldn't pass temporary LangOptions to Lexer.
This change fixes stack-use-after-scope UB in LocalizationChecker found by sanitizer-x86_64-linux-fast buildbot
and resolve similar issue in HeaderIncludes.
clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
clang/lib/Tooling/Inclusions/HeaderIncludes.cpp