[PATCH] D16159: [Sema] Fix PR26085 -- regression caused by making overload resolution more lenient in C.

George Burgess IV via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 13 14:58:44 PST 2016


george.burgess.iv created this revision.
george.burgess.iv added reviewers: bob.wilson, rsmith.
george.burgess.iv added a subscriber: cfe-commits.

Fix PR26085 by suppressing diags from CheckSingleAssignmentConstraints during overload resolution.

It seems that passing `Diagnose`/`Complain` flags around to Sema methods is a mildly common thing, so that’s the approach I took when making this. I’m certainly open to suggestions if there’s a better way to go about this, because "check a flag every time you call `Diag`" seems a bit fragile/error-prone.

N.B. The attached test case is the most ObjC I’ve ever written. If the added test cases seem unintuitive, please let me know. :)

http://reviews.llvm.org/D16159

Files:
  include/clang/Sema/Sema.h
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaExprObjC.cpp
  lib/Sema/SemaOverload.cpp
  test/SemaObjC/ovl-check.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16159.44797.patch
Type: text/x-patch
Size: 24414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160113/32d1bbaf/attachment-0001.bin>


More information about the cfe-commits mailing list