whisperity added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:476-477 + + QualType NewCoreType = CoreType; + NewCoreType.addFastQualifiers(Quals.getFastQualifiers()); + NewCoreType.getQualifiers().addQualifiers(Quals); ---------------- whisperity wrote: > aaron.ballman wrote: > > > Actually, the suggestion is also bad. `getQualifiers()` returns a **copy** on > which adding is a moot operation... Turns out you can use `ASTContext` to > //create// a specifically qualified type for you. > > Now if there was a way to express this in the type of `getQualifiers()`, to > warn you //"Don't make the mistake of thinking this would CHANGE > anything!"//... Sorry, I mean, not the suggestion per se, but these 4 new lines of code contained multiple issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106361/new/ https://reviews.llvm.org/D106361 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits