Fix two -Wrange-loop-analysis warnings that Xcode 12 beta incorrectly complains about
Xcode 12 beta apparently has the Wrange-loop-analysis changes from half a year ago, but it seems to lack https://reviews.llvm.org/D72212 which made the warning usable again.
This commit is contained in:
parent
90a35bd074
commit
7e2d27bc55
|
@ -1049,7 +1049,7 @@ ReferencesResult findReferences(ParsedAST &AST, Position Pos, uint32_t Limit,
|
|||
const auto &IDToRefs = AST.getMacros().MacroRefs;
|
||||
auto Refs = IDToRefs.find(*MacroSID);
|
||||
if (Refs != IDToRefs.end()) {
|
||||
for (const auto Ref : Refs->second) {
|
||||
for (const auto &Ref : Refs->second) {
|
||||
Location Result;
|
||||
Result.range = Ref;
|
||||
Result.uri = URIMainFile;
|
||||
|
|
|
@ -125,7 +125,7 @@ TEST(PreamblePatchTest, IncludeParsing) {
|
|||
#/**/include <b.h>)cpp",
|
||||
};
|
||||
|
||||
for (const auto Case : Cases) {
|
||||
for (const auto &Case : Cases) {
|
||||
Annotations Test(Case);
|
||||
const auto Code = Test.code();
|
||||
SCOPED_TRACE(Code);
|
||||
|
|
Loading…
Reference in New Issue