tmatheson marked 3 inline comments as done.
tmatheson added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3048
     D->addAttr(NewAttr);
+    if (auto FD = dyn_cast<FunctionDecl>(D))
+      if (auto SA = dyn_cast<SectionAttr>(NewAttr))
----------------
aaron.ballman wrote:
> Does this need to be limited to function declarations? It seems to me that 
> this should also be used on say ObjCMethod declarations or global variables 
> as well, right?
> 
> If so, then `Sema::UnifySection()` may need to be updated as well as it 
> currently accepts a `DeclaratorDecl` but some of these constructs (like 
> `ObjcMethodDecl` and `ObjCPropertyDecl`) are `NamedDecl`s and not declarators.
I've extended this to include Objective-C methods and properties and template 
functions. Gobal variables are handled by 
Sema::CheckCompleteVariableDeclaration.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93102/new/

https://reviews.llvm.org/D93102

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to