search for: declrefexpr

Displaying 13 results from an estimated 13 matches for "declrefexpr".

2013 Jul 22
0
[LLVMdev] Libclang get class name from DeclRefExpr
...memberName, methodName, param); clang_visitChildrenWithBlock(cursor, ^enum CXChildVisitResult(CXCursor cursor, CXCursor parent) { // test if ([param isEqualToString:@"helpmeh"] && cursor.kind == CXCursor_DeclRefExpr) { // found the interesting part.. what now? } return CXChildVisit_Recurse; } } } return CXChildVisit_Continue; } } I'm just a bit lost...
2016 Nov 28
2
Looking for help with an ast matcher
Hi Piotr, I think I found a working matcher: match ifStmt(hasCondition(implicitCastExpr(hasImplicitDestinationType(isInteger()), has(cxxMemberCallExpr(callee(cxxMethodDecl(hasName("compare"))), hasArgument(0, declRefExpr().bind("str2")), callee(memberExpr(has(declRefExpr().bind("str1"))))))))).bind("case1") This one bind to both str1 and str2 in str1.compare(str2). I have included a code segment below. I have attached a screenshot of this matcher working from clang-query. HOWEVER - wh...
2016 Nov 28
2
Looking for help with an ast matcher
...ittle bit just to understand it: > > ifStmt(hasCondition(implicitCastExpr(hasImplicitDestinationType( > isInteger()), > has(cxxMemberCallExpr(callee(cxxMethodDecl(hasName(" > compare"))), > hasArgument(0, > declRefExpr().bind("str2")), > callee(memberExpr(has( > declRefExpr().bind("str1"))))))))).bind("case1") > > And this is the AST part that we care about > |-IfStmt 0x7fba9625f5e8 <line:8:5, line:10:5> > | |-<&l...
2015 Apr 23
2
[LLVMdev] Get precise line/column debug info from LLVM IR
...fec3869f20 <col:15, col:37> 'unsigned int' '+' | |-CallExpr 0x7ffec382d7e0 <col:15, col:24> 'unsigned int' | | |-ImplicitCastExpr 0x7ffec382d7c8 <col:15> 'unsigned int (*)(unsigned int)' <FunctionToPointerDecay> | | | `-DeclRefExpr 0x7ffec382d6d8 <col:15> 'unsigned int (unsigned int)' Function 0x7ffec382d490 'fib' 'unsigned int (unsigned int)' | | `-BinaryOperator 0x7ffec382d778 <col:19, col:23> 'unsigned int' '-' | | |-ImplicitCastExpr 0x7ffec382d748 <c...
2019 Jun 09
2
Strange local variable cv::VideoCapture allocated
...ame 'cv::Mat &' | |-ParmVarDecl 0x7ff113148780 <col:49, col:54> col:54 used frame_id 'int &' | `-CompoundStmt 0x7ff1131537d8 <col:64, line:486:1> | |-UnaryOperator 0x7ff113148930 <line:482:5, col:7> 'int' lvalue prefix '++' | | `-DeclRefExpr 0x7ff113148908 <col:7> 'int' lvalue ParmVar 0x7ff113148780 'frame_id' 'int &' | |-ExprWithCleanups 0x7ff1131536e8 <line:483:5, line:484:32> 'cv::VideoCapture' | | `-ConditionalOperator 0x7ff1131536b8 <line:483:5, line:484:32> 'cv::Vi...
2016 Nov 27
2
Looking for help with an ast matcher
Adding cfe-dev, because it is related to clang, not LLVM. 2016-11-27 22:34 GMT+01:00 Piotr Padlewski <piotr.padlewski at gmail.com>: > Hi Mads, > Can you provide the code that you run clang-query on, or at least AST for > the fragment you want to match? > > Piotr > > 2016-11-26 22:27 GMT+01:00 Mads Ravn via llvm-dev <llvm-dev at lists.llvm.org > >: >
2011 Sep 07
1
[LLVMdev] manipulating @llvm.var.annotation in AST?
Is there anyway to manipulate @llvm.var.annotation at the AST level? In the source file you could do something like __attribute__((annotate("GlobalValAnnotation"))); Is it possible todo something like that with a Clang::DeclRefExpr? Could something be done to @llvm.var.annotation "by hand"? How do you access this? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110907/32fdb7ed/attachment.html>
2016 Apr 14
2
Little explanation of this behaviour
I tried to emit IR for a function that returns the sum between an signed char and a double in C++, just to see how Clang handles type implicit casting. Can you explain me why Clang converted the char type into a 32-bit integer type before casting it to a floating point? Can a sitofp i8 %3 to double be done or is it wrong? define i32 @_Z5sumad(i8 signext %x, double %y) #0 { %1 = alloca i8,
2008 Dec 18
0
[LLVMdev] Troubles with clang and llvm libraries and simple Xcode project
...ng wrong with the steps I took above. I've included a selection of the linker errors below. /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: clang::ASTConsumer::InitializeTU(clang::TranslationUnit&) clang::ASTConsumer::~ASTConsumer() ... vtable for clang::DeclRefExpr vtable for clang::BinaryOperator ... typeinfo for llvm::AliasAnalysis llvm::ConstantFoldCall(llvm::Function*, llvm::Constant* const*, unsigned int) llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::TargetData const*) llvm::ConstantFoldLoadThroughGEPConstantExpr(llvm::Constant*, llvm::Co...
2016 Mar 15
2
[cfe-dev] GSoC AST->XML project still open?
2012 Oct 10
0
[LLVMdev] [cfe-dev] OpenMP support in CLANG: A proposal
...the same clauses which appear more than once in an OpenMP directive statement are represented as a linked list. This representation makes tree traversal easier for few particular semantic checks. #. Variables in the list clauses like ?private? clause are represented as ?DeclRefExpr? node. #. ASTs are designed and implemented in such a way that *no* OpenMP information is lost including source location information. -. Skeleton routines (with few partially implemented) for parsing, semantic analysis are introduced. -. The option ?-fopenmp? is implemented. Cla...
2012 Oct 10
2
[LLVMdev] [cfe-dev] OpenMP support in CLANG: A proposal
On Wed, Oct 10, 2012 at 5:40 AM, Eli Friedman <eli.friedman at gmail.com>wrote: > On Tue, Oct 9, 2012 at 4:37 AM, Mahesha HS <mahesha.llvm at gmail.com> wrote: > > Hello All, > > > > We would like to make a proposal to support OpenMP in CLANG. The goal of > > this effort is to provide support for syntax > > > > analysis (parsing), semantic
2020 Jul 10
3
[cfe-dev] [RFC] Moving (parts of) the Cling REPL in Clang
Hi Richard, On 7/10/20 11:10 PM, Richard Smith wrote: > Hi Vassil, > > This is a very exciting proposal that I can imagine bringing important > benefits to the existing cling users and also to the clang user and > developer community. Thank you for all the work you and your team have > done on cling so far and for offering to bring that work under the > LLVM umbrella!