[cfe-users] trying to distcc compile for os x on ubuntu, but getting errors on __builtin_ia32_undef128 and objc_bridge
I'm using distcc from my mac laptop to an ubuntu desktop. I installed clang on ubuntu by running "sudo apt-get install clang". Initially I was also getting an error about "blocks". I don't really know what that means, but adding -fblocks fixed it. However, I'm still getting the two following errors (only when remote compiling on ubuntu): clang++ -fblocks -fsanitize=address -g -std=gnu++14 -o /tmp/distccd_ab2d19b4.o -c /tmp/distccd_a8a919b4.ii ...a bunch of my files... In file included from /Users/xaxxon/apb/./glm/glm.hpp:90: In file included from /Users/xaxxon/apb/./glm/fwd.hpp:35: In file included from /Users/xaxxon/apb/./glm/detail/type_int.hpp:35: In file included from /Users/xaxxon/apb/./glm/detail/setup.hpp:454: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/pmmintrin.h:27: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/emmintrin.h:27: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include/xmmintrin.h:582:18: error: use of undeclared identifier '__builtin_ia32_undef128' return (__m128)__builtin_ia32_undef128(); and ...a bunch of my files... In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBundle.h:8: /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:428:30: error: 'objc_bridge' attribute only applies to struct, union or class typedef const __attribute__((objc_bridge(id))) void * CFTypeRef; Can anyone help me figure out how to solve them? Thank you. ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
[cfe-users] How to associate metadata with a class that can be picked up in an AST parser?
I was hoping to be able to use custom attributes in my source code and be able to see them in the AST, but even though there are some mentions on the internet saying this can work, it doesn't seem to. If I say class [[random_attribute]] Foo {}; I see nothing in -ast-dump, but if I change it to [[deprecated]], it shows up. Assuming this isn't possible, is there another approach with similar behavior that I can use in a clang plugin to see that I'm "interested" in a class which doesn't otherwise change its behavior (or require me to modify and recompile clang)? Thank you. --Zac That said, I did manage to get a plugin working that prints out all the class names it sees. After fighting with a lot of boilerplate, the actual logic part is pretty nice with matchers! ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
[cfe-users] two copies of class with dependent base - one is "unusable"
if I have something like template class V8TOOLKIT_WRAPPED_CLASS MyTemplate {}; template class V8TOOLKIT_WRAPPED_CLASS DerivedFromMyTemplate : public MyTemplate {}; and then DerivedFromMyTemplate some_var; I get two CXXRecordDecl's from my matcher which just matches all classes and structs -- one with a base of MyTemplate and it has no associated cxxrecorddecl or tagdecl. It has typeclass 32 (which I don't know what means). Then I get another one with with a base of: MyTemplate (notice vs ). This one also has typeclass 32 but does have a cxxrecorddel and tagdecl. If I instantiate another type, DerivedFromMyTemplate some_other_var; I do not get another "bad" type, I just get 3 - bad, int, short. I've gotten what I need by simply skipping the "bad" one but I'd like to know what's going on. Thank you. --Zac ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
[cfe-users] parsing ParamCommandComment and getting trailing newline and * for next ParamCommandComment
While going through the child comments of a fullcomment, specifically the ParamCommandComment, when I try to get the description of the param, I'm getting the trailing newline and * for the next line /** * This is some function * @param some_param this is what it does * @param some_other_param ... */ I just want to get "this is what it does" but I end up with ``` this is what it does * ``` when I say some_param_command_comment->getParagraph->getSourceRange() (pseudocode). Is there a better way to do this? Thank you. -Zac ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces
While it generates some ugly code I found it easier to simply use the canonical names for all types. I spent tens of hours fighting this and never found a good way. On Tuesday, September 27, 2016, Michael via cfe-users < cfe-users@lists.llvm.org> wrote: > Nobody? Wrong list? Any insight in this would be greatly appreciated. > > Thanks > > Michael > > On 08/30/2016 07:00 PM, Michael via cfe-users wrote: > >> Hi >> >> Hope I picked the right place for this kind of problem, if not please let >> me know. >> >> I'm using libclang to parse header files and generate code from them. I >> found that clang_getTypeSpelling() usually includes the namespace(s) a type >> was declared in. However with the exception being typedefs (and same for >> "using A = B"). Not sure if this is a bug or intended behavior, but it >> seems at least inconsistent. I also couldn't really find a good workaround >> for this. I'd have to manually figure out all typedefs (not just pure >> typedefs, they could also be template parameters or whatever) and then >> their originating namespaces. This sounds a bit cumbersome and not really >> straight forward. >> >> Minimal example: >> >> namespace foo { >> class Bar { >> }; >> typedef Bar BarDef; >> } >> >> clang_getTypeSpelling on "Bar" (kind "Record") gives: "foo::Bar" >> clang_getTypeSpelling on "BarDef" (kind "Typedef") gives: "BarDef" (<== >> missing "foo::") >> >> Any idea how to solve this problem? Am I missing something? >> >> Thanks >> >> Michael >> ___ >> cfe-users mailing list >> cfe-users@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users >> > > ___ > cfe-users mailing list > cfe-users@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users > ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users