The short answer is no. A longer answer is that, Clang is just a compiler from C++ (and C and ObjC) to LLVM IR, going via the AST. Its external APIs all relate to compiling and analyzing C++. Once you parse a language like your sample to an AST, what...
Creating new AST nodes is quite cumbersome in Clang, and it's not the recommended way to use libTooling. Rather, you should "read" the AST and emit back code, or code changes (rewritings, replacements, etc). See this article and other articles (and code samples) linked from it for more information on...
c++,c++11,gcc,clang,overload-resolution
I believe Clang is correct here. GCC should not be accepting the code. The reason is the way overload resolution for constructors for the object copy occurring in a return statement is specified in [class.copy] p32 (emphasis mine): When the criteria for elision of a copy/move constructor are met, [...],...
xcode,osx,gcc,clang,osx-yosemite
Since you have your gcc in /usr/local, it is not part of your operating system. The cleanest - but brute force - way is to delete /usr/local completely, and then reinstall the things you want to have there. See also here. /usr/local is a directory that doesn't come from OSX,...
objective-c,xcode,linker,clang
I don't know of a way to modify the compiler arguments for this file, but it's possible to address the warning by abusing VERSION_INFO_EXPORT_DECL. Set the value to a literal newline followed by #import "HeaderWithExternDeclarations.h" and another literal newline. In the pbxproj it should look something like this: VERSION_INFO_EXPORT_DECL =...
c,gcc,garbage-collection,clang,tcc
I suppose that you use a kind of "mark and sweep" GC. In such case you only need to save registers at the moment when marking phase starts. My advise is to examine your GC, find the place where the "mark and sweep" operation starts and to put a code...
I checked your project. The issue is simple, in your project there is no main.m file. I think you accidentally deleted that. Add a new .m file to your project, name it as main And add the following code to it: #import <UIKit/UIKit.h> #import "AppDelegate.h" int main(int argc, char *...
Introduction The reason for the behavior is quite simple; m_deleter is unconditionally invoked in the destructor of Foo, even in circumstances when it isn't callable. The straight forward implementation of std::swap creates a temporary to hold the intermediate result of one of the two operands, this temporary will not have...
c++,osx,c++11,compilation,clang
time() is a function in standard C, which means that it's living outside a namespace so that "old" C code can be compiled with C++ compilers without having lots of using namespace std thrown in all over the place. The header time.h is apparently included when you include <iostream>, which...
c,osx,clang,static-libraries,ar
The library should have generated with libtool -static. gcc -c io.c libtool -static -o libio.a io.o gcc main.c -lio -o main -L. main Returns 10 ar> lipo -info libio.a input file libio.a is not a fat file Non-fat file: libio.a is architecture: x86_64 ar> file libio.a libio.a: current ar archive...
clang will, by default, use its integrated llvm assembler, but this can be disabled with the command line option -fno-integrated-as. Specifying this along with -S should preserve the comments from the inline asm. Running clang -S -O3 -fno-integrated-as on the code sample #include <cmath> #define ASM_LABEL(label) asm ("#" label "\n\t"...
c++,c++11,clang,incomplete-type,gcc5
It is undefined behavior to instantiate a standard library container with an incomplete type. [res.on.functions]/1, 2.5: 1 In certain cases (replacement functions, handler functions, operations on types used to instantiate standard library template components), the C++ standard library depends on components supplied by a C++ program. If these components do...
As others mentioned, you're reading an uninitialized local variable and that's undefined. So, anything is legit. Having said that, there is a particular reason for this behavior: gcc reuses variables on the stack as much as it can (i.e., as long as the generated code is provably correct). You can...
It seems you did not initialize all the fields in the struct lws_context_creation_info, leading to undefined behaviour. Depending on compiler options and other less predictable circumstances, your program may actually seem to function correctly... by pure chance! You can fix this easily by clearing the structure with a memset: struct...
#include <openssl/evp.h> ... unsigned char outHash[20]; hash("SHA1","abcd", 20, outHash); OpenSSL does not have a int hash(...) or char* hash(...) function. $ cat /usr/include/openssl/evp.h | grep hash returns 0 hits. man 3 hash returns BSD's "hash database access method". Undefined symbols for architecture x86_64: "_hash", referenced from: _getRandomSHA1 in main-68ccd6.o...
You can do it like this: #include <stdio.h> #include <string> enum class Car { BMW }; class C { static void Method() { puts("inner");} }; template<typename T> class BaseClass { private: template<typename V> struct Helper; template<typename V> using Info = Helper<V>; template<typename V> using InnerType = typename Info<V>::InnerType; private: T...
You're doing everything right, the only thing you're missing is: Clang we have in Xcode is different from Clang we can download at http://clang.llvm.org. You can obtain Apple's version of compiler at http://opensource.apple.com under 'Developer tools', but usually there is pretty old version. Whenever Apple engineers introduce something new into...
c,gcc,macros,clang,c-preprocessor
It is probably complaining that the expression expanded from color_num is an unsigned (perhaps unsigned long) while the format in the printf is a signed integer. sizeof gives size_t, which is always an unsigned type, as noted in is size_t always unsigned?, but the number of bits depends on the...
r,clang,openmp,rcpp,intel-composer
Here's my best guess at what's going on. In Rcpp, we provide specializations for std::swap() here, with relevant bits copied for brevity: namespace std { #undef RCPP_GENERATE_SWAP #define RCPP_GENERATE_SWAP(TYPE,RTYPE) \ template<> inline void swap< Rcpp::internal::TYPE<RTYPE> >( \ Rcpp::internal::TYPE<RTYPE>& a , \ Rcpp::internal::TYPE<RTYPE>& b) { \ a.swap(b) ; \ } RCPP_GENERATE_SWAP(generic_proxy,VECSXP)...
cmake,clang,cross-compiling,mingw-w64,libobjc2
Okay, so I figured that I would need to add -lobjc to the CMAKE_CXX_FLAGS, but it never occured to me to add a linker search path for the library. Running the following before make solves my problem: cmake .. -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS=$CLANG_WINDOWS_XFLAGS -DCMAKE_CXX_FLAGS="$CLANG_WINDOWS_XFLAGS -L`pwd` -lobjc" -DCMAKE_INSTALL_PREFIX=/opt/cross/windows/gnustep ...
c++,gcc,clang,compiler-optimization
As a rule, your code is always inlined only if you specify: __attribute__((always_inline)) eg (from gcc documentation): inline void foo (const char) __attribute__((always_inline)); Though it is almost never a good idea to force your compiler to inline your code. You may set a high optimization level (though the O flag)...
Yes, you'll have to create load, add, and store instructions. In LLVM's C++ class hierarchy, Instruction subclasses Value. When you create your LoadInst, you can just refer to it directly when creating new instructions. For example: IRBuilder<> IR(SomeInsertionPoint); LoadInst *Load = IR.CreateLoad(MyGlobalVariable); Value *Inc = IR.CreateAdd(IR.getInt32(1), Load); StoreInst *Store =...
n4191 was revised by n4295. According to that, an expression of the form (e op ...) is a unary right fold, and that is expanded as: E1 op (... op (EN-1 op EN)), i.e. as a right fold expansion. This does seem to be the reverse of what n4191 stated...
LLVM is a framework for manipulating LLVM IR (the "bytecode" you're alluding to) and lowering it to target-specific binaries (for example x86 machine code). Clang is a front-end for C/C++ (and Objective C) that translates these source languages into LLVM IR. With this in mind, answering your questions: For all...
There was a recent change in clang trunk. The compiler does no longer emit weak definitions of the sized operator delete (see the commit 229241). The flag to emit the definitions anyway (-fdef-sized-delete) was renamed later in commit 229597. You have to compile your program with the -fdefine-sized-deallocation flag so...
c++,visual-c++,gcc,compiler-errors,clang
[namespace.udecl]/p18: The alias created by the using-declaration has the usual accessibility for a member-declaration. Not much to say here. The name B::C is publicly accessible, and the code is well-formed. Just another MSVC bug....
c++,osx,twitter,makefile,clang
I can get the shared / dynamic library to compile but needed to make a couple of adjustments to your Makefile: LDFLAGS += -rpath $(STAGING_DIR)/usr/lib and $(CC) -dynamiclib -shared -Wl,-install_name,lib$(LIBNAME).dylib.1 $(LDFLAGS) -o lib$(LIBNAME).dylib *.o -L$(LIBRARY_DIR) -lcurl I've now also built the associated twitterClient utility. To do so, I had to...
The warning is emitted for the comparison using ==, not for the call. If you have two functions that both call compare<float>, and you would somehow manage to suppress the warning for the first call, there wouldn't be anything left to warn for in the second call: compare<float> has already...
How about using normal template parameter packs like usual? Like e.g. template<typename T, typename... argsT> T *allocate(argsT... args) { return new T(std::forward<argsT>(args)...); } ...
May be there are several ways to achieve this, but finally I got the following snippet working and to me it looks simple enough: //arguments to the compiler std::unique_ptr <std::vector<const char*>> args(new std::vector<const char*>()); args->push_back("my_file.c"); //do the magic ASTUnit *au = ASTUnit::LoadFromCommandLine( &(*args)[0], &(*args)[0] + args->size(), IntrusiveRefCntPtr<DiagnosticsEngine>( CompilerInstance::createDiagnostics(new DiagnosticOptions)), StringRef()...
This answer is about something that you should resolve before you go further, because it is going to make reasoning about what happens much harder otherwise: Surely printing “0.1 = 0x0.07fff00000001p-1022” or “0.1 = 0x0.0000000000001p-1022” can only be a bug on your compilation platform caused by ABI mismatch when using...
Use __attribute__((__noreturn__)), instead. All the gcc attributes have a __ version such that you can sanely use them in system headers without polluting the user name space. Some platform providers also don't seem to be aware of that problem. I recently discovered that for OS X they have the unprotected...
Then I also tried LD_PRELOAD As explained here, in order to use custom glibc, you need to set correct --dynamic-linker. I see that you are using --dynamic-linker=/usr/local/glibc/glibc-2.21/ld-linux.so.2, but that doesn't look right: you need ld-linux-x86-64.so.2. export LD_PRELOAD='/usr/local/glibc/glibc-2.21/lib/ld-linux-x86-64.so.2 ... That (preloading of ld-linux) can never work: it's the ld-linux that...
c,gcc,visual-studio-2013,clang
From 6.5.2.2 Function calls: 2 - If the expression that denotes the called function has a type that includes a prototype, the number of arguments shall agree with the number of parameters. [...] VC is being deliberately permissive in order to permit compilation of (for compatibility with) incorrect code. This...
From C++11 8.5.4 List Initialization [dcl.init.list]: 5 An object of type std::initializer_list<E> is constructed from an initializer list as if the implementation allocated an array of N elements of type E, where N is the number of elements in the initializer list. Each element of that array is copy-initialized with...
stdbool.h is a C header, not a C++ header. It is not usually found in C++ programs because true and false are already keywords in C++. Consequently, if a C++ program includes stdbool.h it is a fairly clear indication that it is a ported-over C program (e.g. a C program...
You should use member initializer list syntax to call appropriate Rect constructor with your arguments: Square(int width) : Rect(width, width) { printf("Square constructor called.\n"); } Notice that you don't need to manually assign to this->width and this->height, Rect constructor will do this for you. Main advantage of using initializer list...
c++,types,clang,abstract-syntax-tree
The reason for this is due to how clang interprets the return type of your function NS::X foo(); ^^^^^ According to the documentation, an ElaboratedType represents a type that was referred to using an elaborated type keyword, e.g., struct S, or via a qualified name, e.g., N::M::type, or both. This...
From clang source, in SemaChecking.cpp:~7862, it seems they are only looking at types like you mention: CharUnits SrcAlign = Context.getTypeAlignInChars(SrcPointee); if (SrcAlign >= DestAlign) return; // else warn... It looks to me like clang is preparing for a c-style cast which in turn will check for cast alignment. void CastOperation::CheckCStyleCast()...
c++,android-ndk,cross-platform,clang,visual-studio-2015
First, the Opus Codec distribution comes with Visual Studio projects that are configured to build only Windows libraries, which are not cross-platform. You need to replace these projects with Cross Platform Library projects. Or better alternative: just download prebuilt libopus.a, e.g. from here. Second, you cannot use #pragma comment(lib, ...)...
c++,c++11,gcc,clang,language-lawyer
Yes, this is valid, there was defect report 1688: Volatile constexpr variables that was filed for this, saying: There does not appear to be language in the current wording stating that constexpr cannot be applied to a variable of volatile-qualified type. Also, the wording in 5.19 [expr.const] paragraph 2 referring...
The extern "C" linkage specification is something you attach to a function declaration. You don't put it at the call site. In your case, you'd put the following in a header file: #ifdef __cplusplus extern "C" { #endif void function_in_C(char const *); /* insert correct prototype */ /* add other...
Resolved. I wasn't aware of cursors, thanks to Benjamin for pointing me in the right direction.See cursors for the function clang_getCursor which, providing it with a precise location in source code, returns the corresponding cursor into the AST, which then can be queried for kind, name, children, and location of...
c++,multithreading,clang,wxwidgets,thread-sanitizer
The issue is that FreeBSD 10.1 and before has a bug, preventing llvm-symbolizer from working correctly. llvm-symbolizer is how TSAN gets the symbol information. More specifically, FreeBSD gives a dlpi_name without the path in dl_iterate_phdr. This was patched at https://reviews.freebsd.org/D932. The patch is available in FreeBSD 10-STABLE (at the time...
linux,windows,multithreading,c++11,clang
You are violating the standard's requirements for calling wait: void wait(unique_lock& lock); Requires: lock.owns_lock() is true and lock.mutex() is locked by the calling thread, and either: — no other thread is waiting on this condition_variable object or — lock.mutex() returns the same value for each of the lock arguments supplied...
Porting to Emscripten is the same as porting to any other platform: you have to use that's platform's own platform-specific headers. Some will have nice equivalents, and some won't. In most cases you'll need to find these chains of platform-specific #if defined(...) and add an #elif defined(__EMSCRIPTEN__), and do the...
c++,namespaces,operator-overloading,clang,argument-dependent-lookup
This is caused by two different CWG issues: CWG issue 2052 and CWG issue 1391. First, CWG 1391. On encountering x + a, the usual name lookup finds, among other overloads, template <typename T> double operator+ (T, double); Template argument deduction is performed by match T to the type of...
Most compilers will automatically define: __SSE__ __SSE2__ __SSE3__ __AVX__ __AVX2__ etc, according to whatever command line switches you are passing. You can easily check this with gcc (or gcc-compatible compilers such as clang), like this: $ gcc -msse3 -dM -E - < /dev/null | egrep "SSE|AVX" | sort #define __SSE__...
c,optimization,clang,inline,c99
At -O1 and greater it is not calling the function it just moves the code into main, we can see this by using godbolt which shows the asm as follows see it live: main: # @main pushq %rax movl $.L.str, %edi movl $42, %esi xorl %eax, %eax callq printf xorl...
c++11,gcc,clang,initializer-list
Using GCC 4.9.1 and the following options: -Wall -Wextra -std=c++11 -pedantic this is what you get: prog.cc:7:5: warning: ISO C++ prohibits anonymous structs [-Wpedantic] }; ^ prog.cc: In constructor 'Bar::Bar()': prog.cc:11:21: warning: ISO C++ does not allow C99 designated initializers [-Wpedantic] Bar(void) : test{.a = 1, .b = 2} {...
The #ifdefs where handled correctly by the compiler. The issue was related to the use of SWIG for wrapping the interface in Python/Java/R/Ruby/Octave/Tcl/Lua/C#. The defines were not passed to SWIG which therefore did not compile what was inside the #ifdef. Adding %include "sitkConfigure.h" to the SWIG .i file fixed the...
Upgrade your clang version, it's very likely that clang 3.1 can't deal with the 4.8 libstdc++ headers. http://llvm.org/releases/download.html http://llvm.org/apt...
You need to modify framework A, So that it export a private module. Create a private module map file in A project. This would be something like this: A/private.modulemap: explicit module A.Private { // Here is the list of your private headers. header "Private1.h" header "Private2.h" export * } In...
I don't see the standard specifying anything about the const-callability of the wrapper returned by mem_fn. From [func.memfn] (quoting N4140): template<class R, class T> unspecified mem_fn(R T::* pm); 1 Returns: A simple call wrapper (20.9.1) fn such that the expression fn(t, a2, ..., aN) is equivalent to INVOKE (pm, t,...
I don't know quite what you want to get. You can get lldb to stop at the point where the exception is going to be thrown by setting a breakpoint on the exception throw: (lldb) break set -n __cxa_throw Then you will stop in the debugger at the point where...
ios,objective-c,iphone,xcode,clang
Thanks everyone, I managed to sort it. @Droppy pointed me in the right direction. Before the -ObjC flag there was another called -force_all. I then stumbled across this answer which indicated that you only need the -ObjC flag. I removed -force_all and it started to work!...
I collect the web-site by wget.
ios,objective-c,clang,linker-error,quickblox
Try to update Xcode to latest 6.3 - this should work
This assignment is incredibly messed up: *(int **) (&funcPtr) = *(int **) fPtr; Not only does it violate strict-aliasing to write an int* and then use it as a function pointer on the next line, but a data pointer is often not large enough to hold an entire code pointer....
Firstly, drop using CompilerInstance- the ownership semantics are so bad it's practically unusable (unless they fixed that in 3.6 with unique_ptr). It's easier to simply make the components yourself. Secondly, yes, you have to do it yourself. Here's a verbatim excerpt from my own project that uses Clang: clang::HeaderSearch hs(/*params*/);...
What about: clang-format -i -style=WebKit *.cpp in the project folder. The -i option makes it inplace (by default formatted output is written to stdout)....
No, gcc is not installed as /usr/bin/gcc. Clang is installed as /usr/bin/gcc, because Apple doesn't ship gcc anymore. If you want gcc, you need to install it (presumably by saying brew install gcc) and then setting CC=/usr/local/bin/gcc.
I think it is 14.5.7 Alias templates 1 A template-declaration in which the declaration is an alias-declaration (Clause 7) declares the identifier to be a alias template. An alias template is a name for a family of types. The name of the alias template is a template-name. The above means...
c++,gcc,clang,mingw-w64,libc++
(moving/expanding from the comments) I've always seen stuff being included explicitly from those locations, e.g. <bits/c++config.h>, <ext/bitmap_allocator.h>, <tr1/cmath> and the like, never adding one of those directories directly to the include search path. Notice that, as far as I always understood, the bits directory should be mostly left alone, as...
You haven't violated any rule. It appears to be a problem with GCC's support for variable templates, not only default arguments, because this adjustment works: template <typename ... T> struct f { static constexpr bool v = false; }; template <typename ... Ts, bool F = fn::call(f<Ts>::v ...)> void hoge...
The Service and County files both seem to have a response symbol. Maybe the old project had a preprocessor symbol that excluded one, or maybe both files weren't actually compiled in the target.
The problem is most likely that you have no control over when the thread starts to run, so the spawn_bserver_thread function may exit before the thread function starts, meaning the sockfd variable goes out of scope and the pointer argument to the bserver_thread function is no longer valid.
c++,templates,gcc,clang,language-lawyer
The standard only requires the name-lookup to happen at phase 1, when the template is first parsed. This turns up badfoo in badbar which is why the code compiles. The compiler is not required to do the overload resolution at that time. The overload resolution (which always happens as a...
arrays,performance,c++11,gcc,clang
A 25x speedup tells you that your code was optimized out. Since your code does nothing visible it is eligible to be deleted. Your benchmark is invalid.
As written in the error message, you can only compile when emitting LLVM IR, not link. Either add -c for the bitcode or -S for the readable form to your command line: clang -Xclang -cc1 -O3 mips.c -emit-llvm -S ...
objective-c,clang,static-linking,pch
When using the clang -cc1 option, the static compilation switch for the PCH header file is: -static-define (Also the main compilation and link should likely be using --static as opposed to -static; this is from the gcc documentation as opposed to the clang documentation)...
If you are planning on getting into ARM asm, I would really suggest that you just skip any use of intrinsics. It seems like a nice idea, just mix your C and asm. But, in actual practice it will save you time and many headaches by just writing a whole...
c++,clang,undefined-behavior,libstdc++,sanitizer
This is a bug in libstdc++, from the cfe-dev mailing list thread with title -fsanitize=undefined and shared libraries says: This is a bug in libstdc++. You will be able to work around it with a sanitizer blacklist file, once Will's patch for that lands, but for now, filtering them out...
gcc,clang,autotools,compiler-options
AM_CXXFLAGS isn't something you should AC_SUBST. It is reserved for use by automake. If you look at the Makefile generated for a C++ target, you will find definitions for CXXCOMPILE and LTCXXCOMPILE, which always include the AM_CXXFLAGS variable. You want to add the (conditional) compiler flag to AM_CXXFLAGS or to...
Make uses Makefiles in the current directory and Implicit-Rules. You can modify the behavior of implicit rules by changing the variables that those explicit rules use. For example, to change the compiler for .cpp files, you could set your own CXX variable, either in the environment (Make uses it): CXX=clang++...
c,clang,language-lawyer,longjmp,address-sanitizer
Is there a reason the helper call is "embedded" into the controlling expression of if through ?: operator? This is actually a violation of the language requirements that says 7.13.1.1 The setjmp macro 4 An invocation of the setjmp macro shall appear only in one of the following contexts: —...
pointer_to_check to check is uninitialized. It points to some "random" location. Accessing uninitialized variables leads to Undefined Behavior which means that anything can happen. Also, pointers should be printed using the %p format specifier. with gcc code, we will get zero at output Anything can be the output. It is...
You should be able to add c/c++-clang to the variable flycheck-disabled-checkers. From the documentation of this variable (C-h v flycheck-disabled-checkers): A list of Flycheck syntax checkers to exclude from automatic selection. Flycheck will never automatically select a syntax checker in this list, regardless of the value of `flycheck-checkers'. Simply add...
c++,gcc,parameters,lambda,clang
I found the answer by myself. It's stated in 'n4296' at § 5.1.2.5: The closure type for a non-generic lambda-expression has a public inline function call operator (13.5.4) whose parameters and return type are described by the lambda-expression’s parameter-declaration-clause and trailing-return-type respectively. For a generic lambda, the closure type has...
c++,makefile,android-ndk,clang
clang++ keeps producing .so shared library (checked with readelf - it is indeed shared object). Is there a special switch to compiler / linker that I have forgotten? My guess: readelf is outputting Elf file type is DYN (shared object file), and you are interpreting that to mean a...
clang,llvm,32bit-64bit,libraries,building
Configure LLVM and Clang with -arch i386 -arch x86_64 i.e.: CFLAGS="-arch i386 -arch x86_64" \ CXXFLAGS="-arch i386 -arch x86_64" \ ./configure --prefix=/prefix --enable-optimized --disable-assertions ...
c++,type-conversion,clang,sse,intrinsics
Debugger, in this example, interprets the __m128i value as two 64-bit integers, as opposed to four 32-bit ones expected by you. The actual conversion is correct. In your code you need to explicitly specify how to interpret the SIMD value, for example: test_i.m128i_i32[0]...
This is CWG issue 1873, which changed the rules for this case ([class.access.base]/p5): A member m is accessible at the point R when named in class N if [...] m as a member of N is protected, and R occurs in a member or friend of class N, or in...
By passing a pointer as the input argument you're loading the value of the pointer rather than what it points to. You need to pass the value you want to load. __m256 V8fLoadU(const float* pf) { __m256 m; __asm__("vmovups %1, %0" : "=x" (m) : "m" (*pf)); return m; }...
ios,objective-c,clang,static-analysis,software-quality
A very important aspect of software quality and stability is unit testing. Unit testing will easily help identify bugs and crashes, although it is not a silver bullet or a cover all solution. Unit testing is part of the Xcode toolset now and can be run right from within Xcode....
ruby,clang,llvm-clang,ruby-c-extension
I have found the errors, the corrected code is : static VALUE c_Index_set_global_options(VALUE self, VALUE options) { Index_t *i; Data_Get_Struct(self, Index_t, i); if (TYPE(options) == T_FIXNUM || TYPE(options) == T_BIGNUM) //clang_CXIndex_setGlobalOptions(i,NUM2UINT(options)); clang_CXIndex_setGlobalOptions(i->data,NUM2UINT(options)); else rb_raise(rb_eTypeError, "invalid type for input"); return Qnil; } static VALUE c_Index_get_global_options(VALUE self) { Index_t *i; Data_Get_Struct(self, Index_t,...
This is not clang bug, the warning is being suppressed because x is subsequently unused, the bug report I cite below explains the rationale behind this behavior. In this specific case it is considered a clang feature to not to produce this warning(Wuninitialized) if the variable is otherwise unused, although...
xcode5,clang,llvm,osx-mavericks,kivy
This is caused by an apparent bug in cython 0.22, which we haven't resolved in kivy master yet (it's not clear what's best, or whether we should fix part of the problem in cython itself). You can resolve it by using cython 0.21, or alternatively there's a pull request for...
c,gcc,memory-management,clang,free
There's no single definitive answer to your question. Firstly, the external behavior of a freed block will depend on whether it was released to the system or stored as a free block in the internal memory pool of the process or C runtime library. In modern OSes the memory "returned...
c++,clang,abstract-syntax-tree
You are using clang++ -cc1 -ast-dump which presumes that the input is preprocessed. When I do that, I get errors, because it can't find std::vector, std::pair, size_t, and this is why it says invalid in lines like this one: |-VarDecl 0x3149810 <testing.cpp:19:1, col:8> col:8 invalid N 'int' |-VarDecl 0x3149880 <line:20:1,...
This is easy to do from either command line or project file. The properties you need to configure are $(CLToolExe) and $(CLToolPath). From the command line: msbuild MyProj.vcxproj /p:CLToolExe=clang-cl.exe /p:CLToolPath=c:\whatever\path\to\the\tool Alternatively, inside your .vcxproj file: <PropertyGroup> <CLToolExe>clang-cl.exe</CLToolExe> <CLToolPath>c:\whatever\path\to\the\tool</CLToolPath> </PropertyGroup> If you are calling task CL directly inside your .vcxproj file,...
xcode,xcode6,clang,ios-frameworks
Select the .h file in the project navigator. In the target membership area on the right there is a drop down menu next to the target. Select "public" there (probably "project" is selected right now).
I believe this is a clang bug. According to the rules for list-initialization in [dcl.init.list]: List-initialization of an object or reference of type T is defined as follows: If T is a class type and the initializer list has a single element of type cv U, where U is T...