[PATCH] D78573: [Clang][Sema] Capturing section type conflicts between #pragma clang section and section attributes

Lucas Prates via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 21 09:42:12 PDT 2020


pratlucas created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Conflicting types for the same section name defined in clang section
pragmas and GNU-style section attributes were not properly captured by
Clang's Sema. The lack of diagnostics was caused by the fact the section
specification coming from attributes was handled by Sema as implicit,
even though explicitly defined by the user.

This patch enables the diagnostics for section type conflicts between
those specifications by making sure sections defined in section
attributes are correctly handled as explicit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78573

Files:
  clang/include/clang/AST/ASTContext.h
  clang/lib/Sema/SemaAttr.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/test/Sema/pragma-clang-section.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78573.259031.patch
Type: text/x-patch
Size: 7337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200421/8abcaa03/attachment-0001.bin>


More information about the cfe-commits mailing list