[PATCH] D25458: Don't create builtin declaration when looking for typo corrections in C++

Albert Gutowski via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 10 18:34:06 PDT 2016


agutowski added inline comments.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:800
+  case Builtin::BI_byteswap_ulong:
+  case Builtin::BI_byteswap_uint64:
   case Builtin::BI__builtin_bswap16:
----------------
thakis wrote:
> Is this an unrelated change?
Yeah, mostly - I had to fix this for tests to work properly.


================
Comment at: lib/Sema/SemaLookup.cpp:2013
 
-  if (LookupDirect(*this, R, LookupCtx)) {
+  if (LookupDirect(*this, R, LookupCtx, /*AllowBuiltinCreation=*/true)) {
     R.resolveKind();
----------------
thakis wrote:
> Are you passing `false` anywhere? I can't find it (but I'm probably just blind) :-)
Yes, it's not visible in the changelist - in line ~4305, in "LookupPotentialTypoResult":

```
SemaRef.LookupParsedName(Res, S, SS, /*AllowBuiltinCreation=*/false, EnteringContext);
```


https://reviews.llvm.org/D25458





More information about the cfe-commits mailing list