[cfe-dev] Best way to know if a method declaration is defined in the source

via cfe-dev cfe-dev at lists.llvm.org
Thu Jun 14 06:58:15 PDT 2018


You probably want the `isUserProvided()` predicate, which is false for things like implicitly defined constructors and destructors.
--paulr

From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Mustakimur Rahman Khandaker via cfe-dev
Sent: Thursday, June 14, 2018 9:36 AM
To: cfe-dev at lists.llvm.org
Subject: [cfe-dev] Best way to know if a method declaration is defined in the source

Hi

I am working on clang codegen module and I would like to know how anyone can identify a CXXMethodDecl is defined in the compiled source. In the codegen, I have encountered number of methods thats are not part of my test source code, so if I try to modify them in codegen, they have broken down. Is there any flag or other way using sourcelocation to discard those method declaration from modification.


Mustakimur Rahman Khandaker
Graduate Research Assistant
Department of Computer Science
Florida State University

mrk15e at my.fsu.edu<https://link.getmailspring.com/link/1528982998.local-dae38628-7a1f-v1.2.2-96fb3a99@getmailspring.com/0?redirect=mailto%3Amustakcsecuet%40gmail.com&recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D>
http://www.dreamlandcoder.com/<https://link.getmailspring.com/link/1528982998.local-dae38628-7a1f-v1.2.2-96fb3a99@getmailspring.com/1?redirect=http%3A%2F%2Fwww.dreamlandcoder.com%2F&recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D>

[Open Tracking]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180614/eb827679/attachment.html>


More information about the cfe-dev mailing list