[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 27 16:20:19 PDT 2018


leonardchan created this revision.
leonardchan added reviewers: rsmith, rjmccall, ebevhan, mcgrathr, phosek.
leonardchan added a project: clang.

If an `address_space` attribute is defined in a macro, print the macro instead when diagnosing a warning or error for incompatible pointers with different address_spaces.

Originally started from http://lists.llvm.org/pipermail/cfe-dev/2018-August/058702.html where the original proposal was a new pragma, but instead just changing the way `address_space` gets printed in a diagnostic.


Repository:
  rC Clang

https://reviews.llvm.org/D51329

Files:
  include/clang/AST/ASTContext.h
  include/clang/AST/Type.h
  include/clang/Lex/Preprocessor.h
  lib/AST/ASTContext.cpp
  lib/AST/TypePrinter.cpp
  lib/Lex/PPDirectives.cpp
  lib/Sema/SemaType.cpp
  test/Sema/address_space_print_macro.c
  test/Sema/address_spaces.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51329.162773.patch
Type: text/x-patch
Size: 10961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180827/c4c4e10c/attachment-0001.bin>


More information about the cfe-commits mailing list