Nicolas Winkler преди 6 години
родител
ревизия
9822322697
променени са 4 файла, в които са добавени 3 реда и са изтрити 8 реда
  1. 1 1
      src/CMakeLists.txt
  2. 0 6
      src/Scope.h
  3. 1 1
      src/sem/CodeGeneration.cpp
  4. 1 0
      src/sem/Type.cpp

+ 1 - 1
src/CMakeLists.txt

@@ -43,7 +43,7 @@ add_definitions( ${LLVM_DEFINITIONS} )
 
 if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER MATCHES ".*clang" )
     target_compile_options(${PROJECT_NAME} PRIVATE 
-        -Wall -Wextra -Wpedantic -pedantic -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable
+        -Wall -Wextra -Wpedantic -pedantic -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wno-keyword-macro
     )
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -DDEBUGGING")
 endif()

+ 0 - 6
src/Scope.h

@@ -54,9 +54,6 @@ public:
     inline Scope(Context& context) :
         context{ context } {}
 
-    Scope(Scope&&) = default;
-    Scope& operator=(Scope&&) = default;
-
     virtual ~Scope(void);
     virtual Variable* getVariable(const std::string& name) = 0;
     virtual Method* getMethod(const std::string& name) = 0;
@@ -160,9 +157,6 @@ public:
         type{ type }
     {
     }
-
-    TypeScope(TypeScope&&) = default;
-    TypeScope& operator=(TypeScope&&) = default;
     
     virtual Variable* getVariable(const std::string& name);
     virtual Method* getMethod(const std::string& name);

+ 1 - 1
src/sem/CodeGeneration.cpp

@@ -181,7 +181,7 @@ llvm::Function* generateFunction(llvm::Module* module, sem::Method* method)
             throw "internal error";
         method->arguments[argIndex]->allocaInst = &*argIterator;
 #ifdef DEBUGGING
-        printf("allocaInst of arg '%s': %p\n", method->arguments[argIndex]->name.c_str(), method->arguments[argIndex]->allocaInst);
+        printf("allocaInst of arg '%s': %p\n", method->arguments[argIndex]->name.c_str(), (void*)method->arguments[argIndex]->allocaInst);
 #endif 
         argIndex++;
     }

+ 1 - 0
src/sem/Type.cpp

@@ -20,6 +20,7 @@ qlow::sem::SemanticObject::~SemanticObject(void) = default;
 
 std::string qlow::sem::SemanticObject::toString(void) const
 {
+    
     return "SemanticObject [" + util::toString(this) + "]";
 }